/* ==========================================
   REMOVE DUPLICATE LINES
   Page-specific styling
========================================== */

.calculator-page {
    background: #f5f7fb;
    color: #111827;
    font-family: "Poppins", sans-serif;
}

.calculator-page .container {
    width: min(90%, 1200px);
    margin: 0 auto;
}

/* Breadcrumb */

.calculator-page .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 18px 0;
    color: #6b7280;
    font-size: 13px;
}

.calculator-page .breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.calculator-page .breadcrumb a:hover {
    text-decoration: underline;
}

/* Advertisement placeholders */

.top-ad,
.ad-placeholder,
.bottom-sticky-ad {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    margin: 18px auto;
    background: #f1f3f6;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #9ca3af;
    font-size: 13px;
}

.top-ad {
    max-width: 970px;
}

.page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: start;
}

.page-main-content {
    min-width: 0;
}

.ad-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ad-sidebar .ad-placeholder {
    width: 100%;
    min-height: 250px;
    margin: 0;
}

/* Hero */

.calculator-page .hero {
    padding: 45px 0 35px;
    text-align: center;
}

.calculator-page .hero-content {
    max-width: 850px;
    margin: 0 auto;
}

.calculator-page .hero h1 {
    margin: 0 0 14px;
    color: #111827;
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.25;
}

.calculator-page .hero p {
    max-width: 720px;
    margin: 0 auto;
    color: #6b7280;
    font-size: 16px;
    line-height: 1.8;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.hero-badges span {
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 30px;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
}

/* Calculator card */

.calculator-section {
    padding: 20px 0 35px;
}

.calculator-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 36px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.calculator-header {
    margin-bottom: 28px;
    text-align: center;
}

.calculator-header h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 25px;
    font-weight: 600;
}

.calculator-description {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.7;
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.form-group label {
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.form-group textarea {
    display: block;
    width: 100%;
    min-height: 220px;
    padding: 15px;
    resize: vertical;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    outline: none;
    background: #fff;
    color: #111827;
    font: inherit;
    font-size: 14px;
    line-height: 1.7;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-group textarea::placeholder {
    color: #9ca3af;
}

#resultText {
    background: #f9fafb;
}

/* Buttons */

.form-actions,
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.calculator-page .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.calculator-page .btn:hover {
    transform: translateY(-1px);
}

.calculator-page .btn-primary {
    background: #2563eb;
    color: #fff;
}

.calculator-page .btn-primary:hover {
    background: #1d4ed8;
}

.calculator-page .btn-secondary {
    background: #fff;
    border-color: #d1d5db;
    color: #374151;
}

.calculator-page .btn-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.calculator-page .btn-danger {
    background: #fff;
    border-color: #fecaca;
    color: #dc2626;
}

.calculator-page .btn-danger:hover {
    background: #fef2f2;
    border-color: #f87171;
}

/* Results */

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 4px;
}

.result-card {
    padding: 20px 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
}

.result-card h3 {
    margin: 0 0 8px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
}

.result-card p {
    margin: 0;
    color: #2563eb;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
}

/* Action section */

.action-section {
    padding: 0 0 35px;
}

.action-buttons {
    max-width: 900px;
    margin: 0 auto;
}

/* About, FAQ and Disclaimer */

.about-section,
.faq-section,
.disclaimer-section {
    padding: 30px 0;
}

.section-title {
    margin: 0 0 20px;
    color: #111827;
    font-size: 25px;
    font-weight: 600;
    text-align: center;
}

.about-card,
.disclaimer-card {
    padding: 25px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.8;
}

.about-card p,
.disclaimer-card p {
    margin: 0 0 14px;
}

.about-card p:last-child,
.disclaimer-card p:last-child {
    margin-bottom: 0;
}

/* FAQ */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
    padding: 18px 20px;
    border: 0;
    background: #fff;
    color: #111827;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

.faq-question:hover {
    background: #f9fafb;
}

.faq-question i {
    flex-shrink: 0;
    color: #2563eb;
    transition: transform 0.2s;
}

.faq-question[aria-expanded="true"] i {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding: 0 20px 18px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-answer p {
    margin: 0;
}

/* Toast */

.calculator-page ~ #toast,
#toast {
    position: fixed;
    right: 24px;
    bottom: 28px;
    z-index: 9999;
    max-width: min(360px, calc(100vw - 32px));
    padding: 13px 18px;
    border-radius: 9px;
    background: #111827;
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

#toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Bottom sticky ad placeholder */

.bottom-sticky-ad {
    display: none;
}

/* Responsive */

@media (max-width: 1000px) {
    .page-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .ad-sidebar {
        display: none;
    }
}

@media (max-width: 700px) {
    .calculator-page .container {
        width: min(92%, 1200px);
    }

    .calculator-page .hero {
        padding: 32px 0 25px;
    }

    .calculator-page .hero p {
        font-size: 14px;
    }

    .hero-badges {
        gap: 8px;
    }

    .hero-badges span {
        padding: 7px 11px;
        font-size: 12px;
    }

    .calculator-card {
        padding: 22px 16px;
        border-radius: 15px;
    }

    .calculator-header h2 {
        font-size: 21px;
    }

    .form-group textarea {
        min-height: 180px;
        padding: 12px;
        font-size: 14px;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .result-card {
        padding: 15px;
    }

    .result-card p {
        font-size: 24px;
    }

    .action-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .action-buttons .btn {
        width: 100%;
        padding: 10px 8px;
        font-size: 13px;
    }

    .action-buttons .btn:last-child {
        grid-column: 1 / -1;
    }

    .about-card,
    .disclaimer-card {
        padding: 18px;
    }

    .section-title {
        font-size: 22px;
    }

    .faq-question {
        padding: 16px;
    }

    .faq-answer {
        padding: 0 16px 16px;
    }

    .bottom-sticky-ad {
        display: flex;
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1000;
        min-height: 55px;
        margin: 0;
        border-radius: 0;
        background: #f1f3f6;
    }

    body {
        padding-bottom: 55px;
    }
}

@media (max-width: 400px) {
    .action-buttons {
        grid-template-columns: 1fr;
    }

    .action-buttons .btn:last-child {
        grid-column: auto;
    }
}

/* ==========================================
   SMARTMYTOOLS AD SPACES
   Desktop and Mobile
========================================== */

/* Top Advertisement */

.top-ad {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #fafafa;
    color: #718096;
    font-size: 14px;
    margin: 0 auto 40px;
    box-sizing: border-box;
}

/* Main Content + Sidebar */

.page-layout {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 35px;
    align-items: start;
}

.page-main-content {
    min-width: 0;
}

/* Sticky Desktop Sidebar */

.ad-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: sticky;
    top: 20px;
    height: max-content;
}

.ad-placeholder {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #fafafa;
    color: #718096;
    font-size: 14px;
    box-sizing: border-box;
}

/* Bottom Sticky Advertisement — Desktop and Mobile */

.bottom-sticky-ad {
    display: flex;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999;
    height: 90px;
    min-height: 90px;
    margin: 0;
    border: 1px dashed #cbd5e1;
    border-radius: 0;
    background: #f1f3f6;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-size: 14px;
}

body {
    padding-bottom: 90px;
}

.site-footer {
    margin-bottom: 0 !important;
}

/* Tablet */

@media (max-width: 1000px) {
    .page-layout {
        grid-template-columns: 1fr;
    }

    .ad-sidebar {
        display: none;
    }
}

/* Mobile */

@media (max-width: 768px) {
    .bottom-sticky-ad {
        height: 60px;
        min-height: 60px;
        font-size: 13px;
    }

    body {
        padding-bottom: 60px;
    }
}