/**
 * Calculateur d’âge de bébé en mois CSS
 * Tool: baby-month-calculator
 * Category: pregnancy
 */

.baby-month-layout {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.baby-month-input-column,
.baby-month-result-column,
.baby-month-result-shell,
.baby-month-content-grid,
.anniversary-list,
.development-milestones,
.vaccination-list {
    min-width: 0;
}

.baby-month-input-column {
    position: sticky;
    top: 20px;
}

.baby-month-result-column,
.baby-month-result-shell {
    display: grid;
    gap: 12px;
}

.baby-month-input-section,
.baby-month-default-state,
.baby-month-main-result,
.baby-month-anniversaries,
.baby-month-development,
.baby-month-vaccination {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    box-sizing: border-box;
}

.baby-month-input-section {
    display: grid;
    gap: 14px;
    padding: 18px;
    background: linear-gradient(180deg, #fffdfa 0%, #faf7f0 100%);
}

.baby-month-input-summary {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #5f5a56;
}

.baby-month-input-list {
    display: grid;
    gap: 12px;
}

.baby-month-input-group {
    display: grid;
    gap: 6px;
}

.baby-month-input-group label {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #2d2a26;
}

.baby-month-input-group input[type="date"],
.baby-month-input-group input[type="text"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    background: #fff;
    color: #2d2a26;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.baby-month-input-group input::placeholder {
    color: #b2ada8;
    font-weight: 400;
}

.baby-month-input-group input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.baby-month-input-hint {
    font-size: 12px;
    line-height: 1.5;
    color: #7a756d;
}

.baby-month-input-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.baby-month-input-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.1);
    color: #8a6500;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.baby-month-input-note i {
    color: #d4af37;
}

.baby-month-default-state {
    display: grid;
    gap: 14px;
    padding: 18px;
    background: linear-gradient(135deg, #fffdfa 0%, #faf7f0 100%);
}

.baby-month-default-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.baby-month-default-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(212, 175, 55, 0.12);
    color: #d4af37;
    font-size: 24px;
    flex-shrink: 0;
}

.baby-month-default-copy {
    display: grid;
    gap: 4px;
}

.baby-month-default-title {
    font-size: 15px;
    font-weight: 700;
    color: #2d2a26;
}

.baby-month-default-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #5f5a56;
}

.baby-month-default-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.baby-month-default-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #efe7da;
    border-radius: 12px;
    background: #fff;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.baby-month-main-result {
    display: grid;
    gap: 14px;
    padding: 18px;
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border-color: #eadfb8;
    box-shadow: 0 8px 18px rgba(212, 175, 55, 0.12);
}

.baby-month-main-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.baby-month-main-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.baby-month-baby-name {
    font-size: 18px;
    font-weight: 700;
    color: #2d2a26;
}

.baby-month-main-caption {
    font-size: 12px;
    font-weight: 600;
    color: #8a6500;
}

.baby-month-summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.28);
    background: #fff;
    color: #8a6500;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.baby-month-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 0.9fr));
    gap: 10px;
}

.baby-month-summary-card {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #efe7da;
    border-radius: 14px;
    background: #fff;
}

.baby-month-summary-card--primary {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.14) 0%, rgba(212, 175, 55, 0.06) 100%);
    border-color: rgba(212, 175, 55, 0.32);
}

.baby-month-summary-card--accent {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.baby-month-summary-label {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    color: #6c655f;
}

.baby-month-age-display {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    min-height: 58px;
}

.baby-month-age-number {
    font-size: 52px;
    font-weight: 700;
    line-height: 0.95;
    color: #d4af37;
}

.baby-month-age-unit {
    font-size: 18px;
    font-weight: 700;
    color: #2d2a26;
}

.baby-month-age-detail {
    font-size: 13px;
    line-height: 1.5;
    color: #5f5a56;
}

.baby-month-summary-metric {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    min-height: 34px;
}

.baby-month-summary-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: #2d2a26;
}

.baby-month-summary-unit {
    font-size: 14px;
    font-weight: 700;
    color: #5f5a56;
}

.baby-month-summary-meta {
    font-size: 12px;
    line-height: 1.5;
    color: #7a756d;
}

.baby-month-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.baby-month-anniversaries,
.baby-month-development,
.baby-month-vaccination {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.baby-month-vaccination {
    grid-column: 1 / -1;
}

.baby-month-anniversaries h3,
.baby-month-development h3,
.baby-month-vaccination h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #2d2a26;
}

.baby-month-anniversaries h3 i,
.baby-month-development h3 i,
.baby-month-vaccination h3 i {
    color: #d4af37;
}

.anniversary-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.anniversary-item {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #faf9f7;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.anniversary-item:hover {
    transform: translateY(-1px);
    border-color: #efe7da;
}

.anniversary-item.passed {
    opacity: 0.72;
}

.anniversary-item.upcoming {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(255, 255, 255, 0.92) 100%);
    border-color: rgba(212, 175, 55, 0.28);
}

.anniversary-name {
    font-size: 13px;
    font-weight: 700;
    color: #2d2a26;
}

.anniversary-info {
    display: grid;
    gap: 2px;
    text-align: left;
}

.anniversary-date {
    font-size: 13px;
    line-height: 1.45;
    color: #2d2a26;
}

.anniversary-status {
    font-size: 12px;
    color: #7a756d;
}

.anniversary-status.upcoming {
    font-weight: 700;
    color: #8a6500;
}

.development-stage {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.09) 0%, rgba(212, 175, 55, 0.03) 100%);
}

.development-stage-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
}

.development-stage-desc {
    font-size: 13px;
    line-height: 1.6;
    color: #5f5a56;
}

.development-milestones {
    display: grid;
    gap: 8px;
}

.milestone-item {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.5;
    color: #2d2a26;
}

.milestone-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #d4af37;
    color: #fff;
    font-size: 11px;
}

.milestone-text {
    min-width: 0;
}

.vaccination-notice {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #faf9f7;
    font-size: 12px;
    line-height: 1.6;
    color: #5f5a56;
}

.vaccination-list {
    display: grid;
    gap: 10px;
}

.vaccination-item {
    display: grid;
    grid-template-columns: minmax(56px, auto) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #faf9f7;
}

.vaccination-item.current {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(255, 255, 255, 0.92) 100%);
    border-color: rgba(212, 175, 55, 0.28);
}

.vaccination-item.completed {
    opacity: 0.74;
}

.vaccination-age {
    min-width: 0;
    font-size: 12px;
    font-weight: 700;
    color: #2d2a26;
    white-space: nowrap;
}

.vaccination-names {
    min-width: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #5f5a56;
}

.vaccination-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.vaccination-badge.current {
    background: #d4af37;
    color: #fff;
}

.vaccination-badge.completed {
    background: #e8e4dc;
    color: #5f5a56;
}


.baby-month-result-shell--waiting .baby-month-main-result {
    border-color: #e8e4dc;
    background: linear-gradient(180deg, #fffdfa 0%, #faf9f7 100%);
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.baby-month-result-shell--waiting .baby-month-summary-badge {
    background: #faf9f7;
    border-color: #e8e4dc;
    color: #8b8478;
}

.baby-month-result-shell--waiting .baby-month-summary-card {
    background: #fcfaf6;
    border-style: dashed;
}

.baby-month-result-shell--waiting .baby-month-age-number,
.baby-month-result-shell--waiting .baby-month-summary-value {
    color: #c7bc9d;
}

.baby-month-result-shell--waiting .anniversary-list:empty,
.baby-month-result-shell--waiting .development-stage:empty,
.baby-month-result-shell--waiting .development-milestones:empty,
.baby-month-result-shell--waiting .vaccination-list:empty {
    padding: 0;
    background: transparent;
    min-height: 0;
}

.baby-month-result-shell--waiting .anniversary-list:empty::before,
.baby-month-result-shell--waiting .development-stage:empty::before,
.baby-month-result-shell--waiting .development-milestones:empty::before,
.baby-month-result-shell--waiting .vaccination-list:empty::before {
    content: attr(data-empty-label);
    display: block;
    grid-column: 1 / -1;
    padding: 12px;
    border: 1px dashed #e8e4dc;
    border-radius: 12px;
    background: #faf9f7;
    color: #8b8478;
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 1100px) {
    .baby-month-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .baby-month-summary-card--primary {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .baby-month-layout {
        grid-template-columns: 1fr;
    }

    .baby-month-input-column {
        position: static;
    }

    .baby-month-content-grid {
        grid-template-columns: 1fr;
    }

    .baby-month-vaccination {
        grid-column: auto;
    }

    .anniversary-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .baby-month-main-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .baby-month-default-preview {
        grid-template-columns: 1fr;
    }

    .vaccination-item {
        grid-template-columns: 1fr;
    }

    .vaccination-badge {
        justify-self: flex-start;
    }
}

@media (max-width: 420px) {
    .baby-month-summary-grid {
        grid-template-columns: 1fr;
    }

    .baby-month-summary-card--primary {
        grid-column: auto;
    }
}

@media (max-width: 520px) {
    .baby-month-input-section,
    .baby-month-default-state,
    .baby-month-main-result,
    .baby-month-anniversaries,
    .baby-month-development,
    .baby-month-vaccination {
        padding: 14px;
    }

    .baby-month-age-number {
        font-size: 42px;
    }

    .baby-month-age-unit {
        font-size: 16px;
    }

    .baby-month-summary-value {
        font-size: 24px;
    }
}
