/**
 * ConvMaster - Age Calculator Styles
 * 
 * @package    ConvMaster
 * @version    1.0.0
 */

/* =====================================================
   TOOL PAGE LAYOUT
   ===================================================== */
.tool-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tool-header__icon {
    font-size: 2.5rem;
}

.tool-header__icon .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
}

.tool-header__icon .icon--purple {
    background: rgba(168, 85, 247, 0.15);
}

.tool-header__text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.tool-header__text p {
    margin: 0;
    color: var(--text-secondary);
}

/* =====================================================
   CURRENT DATE BANNER
   ===================================================== */
.current-date-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1));
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.current-date-banner__icon {
    font-size: 1.25rem;
}

.current-date-banner__text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* =====================================================
   AGE CALCULATOR WIDGET
   ===================================================== */
.age-calc-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.age-calc-widget__inputs {
    padding: 1.5rem;
}

.age-calc-widget__results {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

/* =====================================================
   DATE INPUTS
   ===================================================== */
.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

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

.date-field__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-field__header label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.btn-today {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-today:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: #a855f7;
}

.date-input {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.date-input:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

/* Calendar icon for Chrome/Webkit - Dark mode (default) */
.date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.date-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Calendar icon - Light mode */
[data-theme="light"] .date-input::-webkit-calendar-picker-indicator {
    filter: none;
}

.date-weekday {
    font-size: 0.85rem;
    color: #a855f7;
    font-weight: 500;
    min-height: 1.25rem;
}

/* =====================================================
   CALCULATE BUTTON
   ===================================================== */
.btn-calculate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-calculate:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

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

.btn-calculate__icon {
    font-size: 1.25rem;
}

/* =====================================================
   ERROR MESSAGE
   ===================================================== */
.error-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.3);
    border-radius: var(--radius-md);
}

/* =====================================================
   MAIN AGE DISPLAY
   ===================================================== */
.age-result-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.age-big {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.age-big__number {
    font-size: 4.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.age-big__label {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.age-details {
    display: flex;
    gap: 3rem;
}

.age-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.age-detail__number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.age-detail__label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* =====================================================
   SECTION TITLE
   ===================================================== */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.section-title__icon {
    font-size: 1.1rem;
}

/* =====================================================
   AGE IN UNITS
   ===================================================== */
.age-units {
    margin-bottom: 1.5rem;
}

.units-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.unit-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.unit-card:hover {
    border-color: rgba(168, 85, 247, 0.3);
}

.unit-card__value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.unit-card__label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

/* =====================================================
   NEXT BIRTHDAY
   ===================================================== */
.next-birthday {
    margin-bottom: 1.5rem;
}

.birthday-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1));
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: var(--radius-md);
}

.birthday-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.birthday-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.birthday-age {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.birthday-countdown {
    display: flex;
    gap: 1rem;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #a855f7;
}

.countdown-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* =====================================================
   EXTRA INFO (ZODIAC, ETC.)
   ===================================================== */
.extra-info {
    margin-bottom: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all 0.2s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    border-color: rgba(168, 85, 247, 0.3);
}

.info-card__icon {
    font-size: 2rem;
}

.info-card__label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.info-card__value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* =====================================================
   FUN STATISTICS
   ===================================================== */
.fun-stats {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.fun-stats__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.fun-stats__header:hover {
    background: rgba(168, 85, 247, 0.05);
}

.fun-stats__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.fun-stats__icon {
    font-size: 1.1rem;
}

.fun-stats__toggle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.fun-stats[open] .fun-stats__toggle {
    transform: rotate(45deg);
}

.fun-stats__content {
    padding: 0 1.25rem 1.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    text-align: center;
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #a855f7;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* =====================================================
   RESET BUTTON
   ===================================================== */
.btn-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reset:hover {
    color: #f43f5e;
    border-color: rgba(244, 63, 94, 0.5);
    background: rgba(244, 63, 94, 0.05);
}

/* =====================================================
   INFO NOTICE
   ===================================================== */
.calc-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.calc-info p {
    margin: 0;
}

/* =====================================================
   SEO CONTENT
   ===================================================== */
.tool-content {
    margin-top: 3rem;
}

.tool-section {
    margin-bottom: 2.5rem;
}

.tool-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tool-section > p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.feature-card {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: rgba(168, 85, 247, 0.3);
    transform: translateY(-2px);
}

.feature-card__icon {
    font-size: 1.75rem;
    display: block;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.step-card {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
}

.step-card__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 50%;
    margin-bottom: 0.75rem;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.step-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    padding: 0 1.25rem 1rem;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =====================================================
   HIDDEN UTILITY
   ===================================================== */
[hidden] {
    display: none !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 640px) {
    .tool-page {
        padding: 1rem;
    }
    
    .tool-header {
        flex-direction: column;
        text-align: center;
    }
    
    .tool-header__text h1 {
        font-size: 1.5rem;
    }
    
    .current-date-banner {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .date-inputs {
        grid-template-columns: 1fr;
    }
    
    .age-big__number {
        font-size: 3.5rem;
    }
    
    .age-details {
        gap: 2rem;
    }
    
    .units-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .birthday-card {
        flex-direction: column;
        text-align: center;
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .age-calc-widget__inputs,
    .age-calc-widget__results {
        padding: 1rem;
    }
    
    .age-result-main {
        padding: 1.5rem;
    }
    
    .age-big__number {
        font-size: 3rem;
    }
    
    .age-detail__number {
        font-size: 1.5rem;
    }
    
    .countdown-value {
        font-size: 1.5rem;
    }
    
    .features-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .info-card__icon {
        font-size: 1.5rem;
    }
}

/* =====================================================
   DARK/LIGHT THEME ADJUSTMENTS
   ===================================================== */
[data-theme="light"] .current-date-banner {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(236, 72, 153, 0.08));
}

[data-theme="light"] .birthday-card {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(236, 72, 153, 0.08));
}

[data-theme="light"] .date-input {
    background: white;
}

[data-theme="light"] .stat-item {
    background: rgba(168, 85, 247, 0.05);
}
