/* Compudata Brand Typography */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* InterVariable Self-Hosted Font */
@font-face {
    font-family: 'InterVariable';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('https://branding.compudata.ca/fonts/InterVariable.woff2') format('woff2');
}

@font-face {
    font-family: 'InterVariable';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('https://branding.compudata.ca/fonts/InterVariable-Italic.woff2') format('woff2');
}

body, html {
    height: 100%;
    width: 100%;
    }

body {
    display: table;
    background: #f5f5f5;
    margin: 0;
    font-family: 'InterVariable', sans-serif;
    color: #333333;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #3377cc;
    line-height: 1.2;
}

a {
    color: #3377cc;
    text-decoration: underline;
}

a:hover {
    color: #2566bb;
}

.tableCell {
    display: table-cell;
    height: 100%;
    vertical-align: middle;
    text-align: center;
}

.infoBox {
    display: inline-block;
    margin: 10px;
    border: none;
    border-radius: 8px;
    background: white;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: background 0.3s ease;
    max-width: 800px;
    }

.logo {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
    }

.info-section {
    margin: 30px 0;
    text-align: left;
}

.info-section h2 {
    font-size: 22px;
    color: #3377cc;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #ff6600;
}

.info-row {
    margin: 6px 0;
    line-height: 1.2;
}

.copy-btn {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 10px;
    background: #ff6600;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'InterVariable', sans-serif;
}

.copy-btn:hover {
    background: #e65c00;
    transform: translateY(-1px);
}

.copy-btn:active {
    transform: translateY(0);
}

/* Custom tooltip bubble (shared, positioned via JS) */
.tooltip {
    position: absolute;
    z-index: 2000;
    max-width: 260px;
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-family: 'InterVariable', sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
    pointer-events: none;
    /* Anchor point is the symbol's top-center; shift left by half the
       tooltip's own width and up by its full height (+8px gap). */
    transform: translate(-50%, calc(-100% - 8px));
}

/* Placed below the symbol when there's no room above */
.tooltip.below {
    transform: translate(-50%, 8px);
}

.tooltip.visible {
    opacity: 1;
    visibility: visible;
}

body.dark-mode .tooltip {
    background: #e8e8e8;
    color: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Info symbol link (e.g. EPP status descriptor) - no underline */
.info-symbol {
    text-decoration: none;
    color: #999;
}

.info-symbol:hover {
    color: #3377cc;
}

body.dark-mode .info-symbol {
    color: #777;
}

body.dark-mode .info-symbol:hover {
    color: #6aa3e0;
}

/* Inline icon copy button (e.g. per nameserver) */
.copy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 2px;
    background: none;
    border: none;
    border-radius: 4px;
    color: #999;
    cursor: pointer;
    vertical-align: middle;
    transition: color 0.2s ease, background 0.2s ease;
}

.copy-icon:hover {
    color: #3377cc;
    background: rgba(51, 119, 204, 0.1);
}

.copy-icon.copied {
    color: #4CAF50;
}

body.dark-mode .copy-icon {
    color: #777;
}

body.dark-mode .copy-icon:hover {
    color: #6aa3e0;
    background: rgba(51, 119, 204, 0.2);
}

body.dark-mode .copy-icon.copied {
    color: #66bb6a;
}

.bigText {
    font-size: 42px;
    font-family: 'InterVariable', sans-serif;
    font-weight: 700;
    color: #333333;
    font-feature-settings: 'ss02' 1;
    letter-spacing: 0.05em;
    }

/* Disambiguation for technical data - apply to output values */
.whois-data {
    font-feature-settings: 'ss02' 1;
}

.mediumText {
    font-size: 24px;
    font-family: 'InterVariable', sans-serif;
    font-weight: 600;
    color: #333333;
    }

.smallText {
    font-size: 18px;
    font-family: 'InterVariable', sans-serif;
    font-weight: 400;
    color: #666666;
    }

.myButton {
    font-family: 'InterVariable', sans-serif;
    background: #ff6600;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

.myButton:hover {
    background: #e65c00;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    }

.myButton:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

input[type="text"], textarea {
    margin: auto;
    padding: 12px 20px;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
    font-family: 'InterVariable', sans-serif;
    font-size: 16px;
    font-weight: 400;
    appearance: none;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333333;
    transition: border-color 0.3s ease;
    }

textarea {
    max-width: 600px;
    resize: vertical;
}

input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: #3377cc;
    }

input[type="submit"] {
    font-family: 'InterVariable', sans-serif;
    background: #ff6600;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="submit"]:hover {
    background: #e65c00;
}

label {
    font-family: 'InterVariable', sans-serif;
    font-weight: 600;
    color: #333333;
    display: block;
    margin-bottom: 8px;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(51, 119, 204, 0.2);
    border: 2px solid rgba(51, 119, 204, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 24px;
    z-index: 1000;
}

.theme-toggle:hover {
    background: rgba(51, 119, 204, 0.3);
    transform: scale(1.1);
}

/* Dark Mode Support */
body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

body.dark-mode .infoBox {
    background: #1e1e1e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
    color: #3377cc;
}

body.dark-mode .smallText,
body.dark-mode .mediumText {
    color: #b0b0b0;
}

body.dark-mode .bigText {
    color: #e0e0e0;
}

body.dark-mode input[type="text"],
body.dark-mode textarea {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode input[type="text"]:focus,
body.dark-mode textarea:focus {
    border-color: #3377cc;
}

body.dark-mode label {
    color: #e0e0e0;
}

body.dark-mode .info-section h2 {
    color: #3377cc;
    border-bottom-color: #ff6600;
}

/* Lookup source badge (RDAP / WHOIS) */
.source-badge {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(51, 119, 204, 0.12);
    color: #3377cc;
    border: 1px solid rgba(51, 119, 204, 0.3);
    border-radius: 12px;
    font-family: 'InterVariable', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

body.dark-mode .source-badge {
    background: rgba(51, 119, 204, 0.2);
    color: #6aa3e0;
    border-color: rgba(51, 119, 204, 0.4);
}

/* WHOIS Result Display */
.whois-result {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: left;
    border: 1px solid #ddd;
    max-height: 600px;
    overflow-y: auto;
}

body.dark-mode .whois-result {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

/* Collapsible Details */
details summary {
    cursor: pointer;
    font-weight: 600;
    color: #3377cc;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    user-select: none;
    transition: background 0.3s ease;
}

details summary:hover {
    background: #f0f0f0;
}

body.dark-mode details summary {
    background: #2a2a2a;
    color: #3377cc;
}

body.dark-mode details summary:hover {
    background: #333;
}
