/* Premium Days Until Calculator CSS Overrides */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #06b6d4;
    --accent-success: #10b981;
    --accent-success-light: #ecfdf5;
    --accent-warning: #d97706;
    --accent-warning-light: #fffbeb;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-main: #f9fafb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --input-focus: rgba(79, 70, 229, 0.15);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --hero-gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
}

[data-theme="dark"] {
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --bg-main: #0b0f19;
    --card-bg: #111827;
    --border-color: #374151;
    --input-focus: rgba(79, 70, 229, 0.3);
    --accent-success-light: rgba(16, 185, 129, 0.1);
    --accent-warning-light: rgba(217, 119, 6, 0.1);
    --hero-gradient: linear-gradient(135deg, #3730a3 0%, #0891b2 100%);
}

/* Global Reset & Body */
body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    transition: background-color 0.3s, color 0.3s;
}

/* Hero Section */
.tool-hero {
    background: var(--hero-gradient);
    padding: 3.5rem 1.5rem;
    text-align: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.tool-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.tool-hero h1 {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
    color: #ffffff;
}

.tool-hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(4px);
}

/* Layout Page Grid */
.tool-page {
    max-width: 900px;
    margin: -2rem auto 4rem auto;
    padding: 0 1.25rem;
    position: relative;
    z-index: 10;
}

/* Calc Card Base */
.calc-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 2.25rem;
    margin-bottom: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.calc-card h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
}

.calc-card h2 svg {
    color: var(--primary);
}

/* Form Fields Styling */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-field input, .form-field select {
    font-family: var(--font-sans);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-main);
    outline: none;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.form-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.form-field input:focus, .form-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--input-focus);
}

.field-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Calculate Button */
.calc-btn {
    width: 100%;
    background: var(--primary);
    color: #ffffff;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: var(--font-sans);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.calc-btn:hover {
    background: var(--primary-hover);
}

.calc-btn:active {
    transform: scale(0.985);
}

/* Results Display Box */
.result-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.result-card.highlight {
    border: 1.5px solid var(--border-color);
}

/* Color theme mappings for calculated dates */
.result-card.highlight.is-success-theme {
    background-color: var(--accent-success-light);
    border-color: var(--accent-success);
}

.result-card.highlight.is-success-theme .rc-value {
    color: var(--accent-success);
}

.result-card.highlight.is-warning-theme {
    background-color: var(--accent-warning-light);
    border-color: var(--accent-warning);
}

.result-card.highlight.is-warning-theme .rc-value {
    color: var(--accent-warning);
}

.rc-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.rc-value {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    line-height: 1;
}

.rc-subvalue {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 1.25rem;
}

.copy-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.copy-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.copy-btn.is-success {
    background-color: var(--accent-success);
    color: #ffffff;
    border-color: var(--accent-success);
}

/* Quick Pick Dates Bar */
.quick-picks-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.quick-pick-btn {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-pick-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--card-bg);
}

/* People Also Use Grid ("Related tools") */
.related-tools-section {
    margin-bottom: 3rem;
}

.related-tools-section h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-decoration: none !important;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: var(--shadow-sm);
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-title {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-main) !important;
    font-size: 1.05rem;
    margin: 0;
}

.tool-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

/* Educational Content Area */
.content-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.content-section h2 {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 700;
    margin-top: 2.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.content-section h2:first-of-type {
    margin-top: 0;
}

.content-section p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* CSS-based step numbering (Emoji Free!) */
.steps-box {
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
    counter-reset: steps-counter;
}

.steps-box li {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    counter-increment: steps-counter;
}

.steps-box li::before {
    content: counter(steps-counter);
    position: absolute;
    left: 0;
    top: 2px;
    width: 28px;
    height: 28px;
    background: var(--input-focus);
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.steps-box li strong {
    color: var(--text-main);
}

/* Premium Value Cards Block */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.feature-pill {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-pill svg {
    color: var(--primary);
}

.feature-pill strong {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-pill p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* FAQ Accordion Section */
.faq-accordion {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-card {
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
}

.faq-card h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.faq-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Bulma list fixes */
.related-list {
    margin: 1rem 0;
    padding-left: 1.5rem;
    list-style-type: square;
}

.related-list li {
    margin-bottom: 0.5rem;
}

.related-list li a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.related-list li a:hover {
    text-decoration: underline;
}

/* Footer Section styling */
.footer {
    background-color: var(--card-bg) !important;
    border-top: 1px solid var(--border-color);
    padding: 4rem 1.5rem 3rem 1.5rem !important;
    color: var(--text-muted) !important;
}

.footer .title {
    color: var(--text-main) !important;
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.footer p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer ul li {
    margin-bottom: 0.75rem;
}

.footer ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
}

.footer ul li a:hover {
    color: var(--primary);
}

.footer .accuracy-note {
    font-size: 0.8rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Utilities */
.is-hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tool-hero h1 {
        font-size: 2.25rem;
    }
    .calc-card, .content-section {
        padding: 1.5rem;
    }
}
