/* ===========================================
   Pregnancy Due Date Calculator - Tool Specific Styles (Pink/Teal Theme)
   =========================================== */

/* Tool Layout */
.ddc-box {
    max-width: 950px;
    margin: 0 auto;
}

/* --- Input Control Tabs --- */
.ddc-tabs {
    background: #fdf2f8; /* Very Pale Pink BG */
    border-bottom: 2px solid #f9a8d4; /* Pink border */
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: flex-start;
    padding-top: 10px;
    margin-bottom: 0;
    overflow-x: auto; /* Allow scrolling on tiny screens */
}

.ddc-tab-button {
    flex-shrink: 0; /* Prevents buttons from shrinking */
    padding: 15px 25px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #9c36b5; /* Purple-Pink Text */
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    border-radius: 8px 8px 0 0;
    margin-right: 5px;
    outline: none;
}

.ddc-tab-button.active {
    background: #ffffff;
    border: 1px solid #f9a8d4;
    border-bottom: 1px solid #ffffff; /* Hide bottom border on active tab */
    color: #e879f9; /* Bright Pink */
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

/* --- Calculator Content Area --- */
.ddc-content {
    background: #ffffff;
    border: 1px solid #f9a8d4;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.ddc-tab-pane {
    display: none;
}

.ddc-tab-pane.active {
    display: block;
}

/* Input Styles */
.ddc-input-row {
    display: flex;
    flex-wrap: wrap; /* IMPORTANT: Ensures wrapping on small screens */
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 25px;
}

.ddc-input-group {
    display: flex;
    flex-direction: column;
    text-align: left;
    min-width: 200px; /* Reduced min-width to prevent overflow */
    flex: 1; /* Allow groups to grow and take space */
}

.ddc-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #be185d; /* Dark Pink Label */
    margin-bottom: 8px;
    display: block;
}

.ddc-input {
    padding: 12px;
    border: 1px solid #fbcfe8;
    border-radius: 8px;
    font-size: 1.1rem;
    color: #1f2937;
    width: 100%;
    box-sizing: border-box;
}

.ddc-input[type="date"] {
    font-family: Arial, sans-serif;
}

.ddc-input-description {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 5px;
}

/* --- Results Summary --- */
.ddc-results {
    margin-top: 30px;
    text-align: center;
}

.ddc-summary-box {
    padding: 30px;
    background: #ecfdf5; /* Pale Teal BG for summary */
    border: 2px solid #2dd4bf; /* Teal Border */
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.ddc-due-date-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: #0d9488; /* Deep Teal Highlight */
    line-height: 1.1;
    margin-bottom: 5px;
}

.ddc-due-date-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f766e;
    margin-bottom: 25px;
}

/* Trimester/Milestone Grid */
.ddc-milestone-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    border-top: 1px dashed #5eead4;
    padding-top: 20px;
    text-align: left;
}

.ddc-milestone-item {
    padding: 10px;
    background: #ffffff;
    border-radius: 6px;
    border-left: 4px solid #f9a8d4; /* Pink accent */
}

.ddc-milestone-label {
    font-size: 0.9rem;
    color: #475569;
    font-weight: 600;
    margin-bottom: 5px;
}

.ddc-milestone-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #be185d; /* Dark Pink Value */
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .ddc-milestone-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on medium screens */
    }
}
@media (max-width: 600px) {
    .ddc-tab-button {
        padding: 12px 15px;
        font-size: 1rem;
    }
    .ddc-input-row {
        gap: 15px;
    }
    .ddc-input-group {
        min-width: 100%; /* Full width on small screens */
    }
    .ddc-due-date-value {
        font-size: 2.5rem;
    }
    .ddc-milestone-grid {
        grid-template-columns: 1fr; /* 1 column on extra small screens */
    }
}