/* ==========================================================================
   Age & School Timeline Calculator Styles
   ========================================================================== */

.age-calc-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
}

/* --- Input Panel --- */
.calc-panel {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border-top: 4px solid #4facfe;
}

.calc-panel h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.25rem;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group {
    display: flex;
    align-items: center;
    background: #f8fbff;
    padding: 20px 30px;
    border-radius: 8px;
    border: 1px solid #e1effe;
}

.date-selects {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

.select-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex: 1;
}

.calc-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background-color: #fff;
    flex: 1;
    min-width: 80px;
    cursor: pointer;
    transition: all 0.2s;
}

.calc-select:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.select-suffix {
    font-weight: bold;
    color: #555;
}

/* Early born option */
.early-born-wrap {
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #cce5ff;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #444;
}

.custom-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.early-born-info {
    font-size: 12px;
    color: #e83e8c;
    margin-top: 5px;
    margin-left: 26px;
}

/* --- Results Area (Hidden initially) --- */
#results-area {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Profile Cards --- */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.profile-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #eee;
    transition: transform 0.2s;
}

.profile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.profile-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: bold;
}

.profile-value {
    font-size: 24px;
    font-weight: bold;
    color: #0056b3;
}

.profile-sub {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* Specific cards */
.card-age .profile-value {
    color: #d63384;
    font-size: 32px;
}

.card-year .profile-value {
    color: #198754;
}

/* --- Timeline Table --- */
.timeline-panel {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #4facfe;
    padding-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.timeline-header h3 {
    margin: 0;
    border: none;
    padding: 0;
    color: #333;
}

.btn-copy {
    background: #4facfe;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}

.btn-copy:hover {
    background: #00f2fe;
}

.resume-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.resume-table th,
.resume-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
}

.resume-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #444;
    white-space: nowrap;
}

.resume-table th:first-child,
.resume-table td:first-child {
    width: 35%;
    white-space: nowrap;
}

/* Year/Month column */

.resume-table tr:nth-child(even) {
    background-color: #fafbfc;
}

.resume-table tr:hover {
    background-color: #f1f8ff;
}

.resume-table .group-divider td {
    background-color: #e9ecef;
    padding: 4px;
}

/* Responsive */
@media (max-width: 600px) {
    .date-selects {
        flex-direction: column;
        align-items: stretch;
    }

    .select-wrap {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .resume-table {
        font-size: 14px;
    }

    .resume-table th,
    .resume-table td {
        padding: 10px 8px;
    }
}