/* ==========================================================================
   XS Web Design Tools - Shared Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background: #f0f0f0;
    color: #222;
    line-height: 1.65;
}

a {
    color: #c0006e;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Layout Wrapper
   -------------------------------------------------------------------------- */
.site-wrapper {
    max-width: 980px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.12);
}

/* --------------------------------------------------------------------------
   Site Header
   -------------------------------------------------------------------------- */
.site-header {
    background: #fff;
    padding: 18px 24px 0;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.site-logo {
    height: 50px;
    width: auto;
    display: block;
}

.tools-badge {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    background: #c0006e;
    padding: 4px 10px;
    border-radius: 3px;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Navigation Bar
   -------------------------------------------------------------------------- */
.site-nav {
    background: #2e2e2e;
    border-top: 3px solid #00bcd4;
}

.site-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    padding: 0 24px;
}

.site-nav ul li a {
    display: block;
    color: #ddd;
    font-size: 14px;
    padding: 11px 14px;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}

.site-nav ul li a:hover,
.site-nav ul li a.active {
    color: #fff;
    background: #444;
}

/* --------------------------------------------------------------------------
   Content Area
   -------------------------------------------------------------------------- */
.content-area {
    padding: 28px 24px;
}

.main-content {
    width: 100%;
}

/* Headings */
h1 {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 14px;
    line-height: 1.3;
}

h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 28px 0 10px;
}

h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
}

p {
    margin-bottom: 14px;
    color: #333;
}

/* --------------------------------------------------------------------------
   Tool Form & UI
   -------------------------------------------------------------------------- */
.tool-box {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 22px;
    margin: 22px 0;
}

.tool-box label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

.tool-box input[type="text"],
.tool-box input[type="url"],
.tool-box textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    color: #222;
    background: #fff;
    transition: border-color 0.15s;
}

.tool-box input[type="text"]:focus,
.tool-box input[type="url"]:focus,
.tool-box textarea:focus {
    outline: none;
    border-color: #00bcd4;
}

.tool-box textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 22px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.btn-primary {
    background: #c0006e;
    color: #fff;
}

.btn-primary:hover {
    background: #a0005c;
}

.btn-secondary {
    background: #2e2e2e;
    color: #fff;
    font-size: 13px;
    padding: 7px 14px;
}

.btn-secondary:hover {
    background: #444;
}

/* Tool output area */
.tool-output {
    margin-top: 18px;
    display: none;
}

.tool-output.visible {
    display: block;
}

.output-box {
    background: #fff;
    border: 1px solid #ddd;
    border-left: 4px solid #00bcd4;
    border-radius: 4px;
    padding: 16px 18px;
}

.output-box.error {
    border-left-color: #e74c3c;
    background: #fff8f8;
}

.output-box.success {
    border-left-color: #27ae60;
    background: #f8fff9;
}

.output-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 6px;
}

.output-value {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    word-break: break-all;
}

/* Info card layout for browser detector */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.info-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px 16px;
}

.info-card .card-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #999;
    margin-bottom: 4px;
}

.info-card .card-value {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    word-break: break-word;
}

/* Email list output */
.email-list {
    list-style: none;
    margin: 10px 0;
}

.email-list li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #1a1a1a;
    font-family: "Courier New", Courier, monospace;
    word-break: break-all;
}

.email-list li:last-child {
    border-bottom: none;
}

.email-count {
    font-size: 14px;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 10px;
}

/* Copy all row */
.copy-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.copy-confirm {
    font-size: 13px;
    color: #27ae60;
    font-weight: 600;
    display: none;
}

/* --------------------------------------------------------------------------
   Ad Placeholders
   -------------------------------------------------------------------------- */
.ad-leaderboard {
    margin: 24px 0;
    text-align: center;
}

.ad-leaderboard-inner {
    display: inline-block;
    width: 728px;
    max-width: 100%;
    height: 90px;
    background: #f5f5f5;
    border: 1px dashed #ccc;
    line-height: 90px;
    font-size: 12px;
    color: #aaa;
    border-radius: 3px;
}

.ad-sidebar-box {
    width: 300px;
    height: 250px;
    background: #f5f5f5;
    border: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #aaa;
    border-radius: 3px;
    margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   FAQ Section
   -------------------------------------------------------------------------- */
.faq-section {
    margin-top: 30px;
}

.faq-section h2 {
    margin-bottom: 16px;
}

.faq-item {
    border-bottom: 1px solid #eee;
    padding: 14px 0;
}

.faq-item:first-of-type {
    border-top: 1px solid #eee;
}

.faq-question {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.faq-answer {
    font-size: 15px;
    color: #444;
    line-height: 1.65;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Tool Index - Card Grid
   -------------------------------------------------------------------------- */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 24px 0;
}

.tool-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #fff;
}

.tool-card:hover {
    border-color: #c0006e;
    box-shadow: 0 2px 8px rgba(192, 0, 110, 0.1);
}

.tool-card h3 {
    margin-bottom: 8px;
}

.tool-card h3 a {
    color: #1a1a1a;
    font-size: 16px;
}

.tool-card h3 a:hover {
    color: #c0006e;
    text-decoration: none;
}

.tool-card p {
    font-size: 14px;
    color: #555;
    margin: 0;
}

.tool-card-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

/* --------------------------------------------------------------------------
   CORS Note / Info Callout
   -------------------------------------------------------------------------- */
.info-callout {
    background: #fffbea;
    border: 1px solid #f0d060;
    border-left: 4px solid #f0d060;
    border-radius: 4px;
    padding: 14px 16px;
    font-size: 14px;
    color: #555;
    margin-top: 14px;
}

.info-callout strong {
    color: #333;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: #2e2e2e;
    color: #999;
    font-size: 13px;
    padding: 16px 24px;
    text-align: center;
    line-height: 1.8;
}

.site-footer a {
    color: #ccc;
}

.site-footer a:hover {
    color: #fff;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 680px) {
    .content-area {
        padding: 18px 16px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 22px;
    }

    .site-name {
        font-size: 22px;
    }

    .site-nav ul {
        padding: 0 10px;
    }

    .site-nav ul li a {
        padding: 9px 10px;
        font-size: 13px;
    }

    .ad-leaderboard-inner {
        height: 60px;
        line-height: 60px;
        width: 320px;
    }
}
