@media only screen and (max-width: 600px) {
    .dog-pregnancy-calculator {
        max-width: 100%;
        /* Full width of the viewport */
        margin: 0 0 20px;
        /* Remove side margins, keep bottom margin */
        padding: 15px;
        /* Reduce padding for mobile */
        box-sizing: border-box;
        /* Ensure padding is included in width */
    }



    .dog-pregnancy-calculator input,
    .dog-pregnancy-calculator select,
    .dog-pregnancy-calculator button {
        width: 100%;
        /* Ensure fields take full container width */
        margin-bottom: 12px;
        /* Slightly reduce spacing between fields */
        padding: 10px;
        /* Adjust padding for fields */
        font-size: 14px;
        /* Slightly smaller font size for mobile */
    }

    .dog-pregnancy-calculator button {
        max-width: 100%;
        /* Remove max-width constraint for button */
        padding: 12px;
        /* Adjust button padding */
        font-size: 16px;
        /* Slightly smaller button text */
    }

    .dog-pregnancy-calculator h3 {
        font-size: 15px;
        /* Smaller heading size */
        margin: 12px 0 8px;
        /* Adjust heading margins */
    }



    .result-card h4 {
        font-size: 18px;
        /* Smaller result card heading */
    }

    .result-card ul li,
    .tips-box p,
    .vet-tips-box p {
        font-size: 13px;
        /* Smaller text for lists and paragraphs */
    }

    #loadingSpinner i {
        font-size: 24px;
        /* Slightly smaller spinner */
    }
}

.dog-pregnancy-calculator {
    max-width: 600px;
    margin: 0 auto 40px;
    padding: 30px 25px;
    font-family: 'Segoe UI', sans-serif;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.dog-pregnancy-calculator h3 {
    font-size: 17px;
    font-weight: 600;
    color: #000;
    margin: 18px 0 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dog-pregnancy-calculator input,
.dog-pregnancy-calculator select {
    padding: 12px 14px;
    width: 100%;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 15px;
    background-color: #f8f8f8;
    margin-bottom: 18px;
}

.dog-pregnancy-calculator button {
    padding: 16px 24px;
    background: #055E91;
    color: #fff;
    font-size: 19px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    max-width: 250px;
    margin: 20px auto 0;
    display: block;
    transition: 0.3s ease;
}

.dog-pregnancy-calculator button:hover:enabled {
    background: #044a73;
    transform: scale(1.03);
}

#loadingSpinner {
    display: none;
    text-align: center;
    margin-top: 20px;
}

#loadingSpinner i {
    font-size: 28px;
    animation: spin 1s linear infinite;
    color: #000;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#dueDateResult {
    margin-top: 30px;
    opacity: 0;
    transform: scale(0.95);
    transition: 0.5s ease;
}

#dueDateResult.show {
    opacity: 1;
    transform: scale(1);
}

.result-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
border: 1px solid #ccc;
}

.result-card h4 {
    margin: 0 0 15px;
    font-size: 20px;
    font-weight: 700;
    color: #111;
    border-bottom: 2px solid #ccc;
    padding-bottom: 6px;
}

.result-card ul {
    list-style-type: disc;
    padding-left: 20px;
    margin: 10px 0;
}

.result-card ul li {
    margin-bottom: 10px;
    font-size: 15px;
    color: #333;
}

.error-message {
    color: #d32f2f;
    margin-bottom: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tips-box,
.vet-tips-box {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    border: 1px solid #ccc;
}

.upcoming-weeks-box {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    border: 1px solid #ccc;
}

.weeks-table {
    width: 100%;
    margin-top: 10px;
}

.weeks-table-header {
    display: flex;
    background: #e0e0e0;
    font-weight: 700;
    border-radius: 8px 8px 0 0;
    border: 1px solid #ccc;
    align-items: center;
}

/* Ensure all header columns have same background */
.weeks-table-header .week-col,
.weeks-table-header .signs-col,
.weeks-table-header .tips-col {
    background: #e0e0e0;
    padding: 12px;
    /* match cell padding */
    font-size: 15px;
    text-align: center;
    font-weight: 700;
}

/* Header divider borders to align with body columns */
.weeks-table-header .week-col,
.weeks-table-header .signs-col {
    border-right: 1px solid #ccc;
}

.week-row {
    display: flex;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

.week-row:last-child {
    border-radius: 0 0 8px 8px;
}

/* Current week styling */
.week-row.current-week {
    background: #fff3cd;
    border-color: #ffeaa7;
}

.week-row.current-week .week-col {
    background: #fff3cd;
    color: #2c3e50;
    font-weight: 700;
}

.current-week-text {
    position: relative;
}

.current-week-text::after {
    content: ' (Current)';
    font-size: 11px;
    color: #2c3e50;
    font-weight: normal;
}

.week-col {
    width: 80px;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    border-right: 1px solid #ccc;
    background: #f5f5f5;
}

.signs-col {
    flex: 1;
    padding: 20px 12px;
    font-size: 14px;
    line-height: 1.4;
    border-right: 1px solid #ccc;
}

.tips-col {
    flex: 1;
    padding: 20px 12px;
    font-size: 14px;
    line-height: 1.4;
}


@media only screen and (max-width: 600px) {

    .weeks-table-header {
        display: none;
    }

    .week-row {
        flex-direction: column;
        border: 1px solid #ddd;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
        background: #fff;
    }

    .week-row:last-child {
        margin-bottom: 0;
    }

    .week-col {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        background: transparent;
        text-align: left;
        font-size: 16px;
        font-weight: 700;
        padding: 0 0 10px 0;
        margin-bottom: 10px;
    }

    .current-week-text::after {
        content: ' (Current Week)';
        font-weight: normal;
        font-style: italic;
        color: #666;
        font-size: 13px;
        margin-left: 5px;
    }

    .week-row.current-week {
        border-color: #055E91;
    }

    .week-row.current-week .week-col {
        color: #055E91;
        background: transparent;
    }

    .signs-col,
    .tips-col {
        padding: 0;
        font-size: 14px;
        border: none;
    }

    .tips-col {
        margin-top: 15px;
    }

    .signs-col::before {
        content: 'Signs:';
        font-weight: 600;
        display: block;
        margin-bottom: 8px;
        font-size: 15px;
        color: #333;
    }

    .tips-col::before {
        content: 'Key Tips:';
        font-weight: 600;
        display: block;
        margin-bottom: 8px;
        font-size: 15px;
        color: #333;
    }

    .upcoming-weeks-box h4 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .weeks-table {
        margin-bottom: 15px;
    }

    .tips-box {
        margin-bottom: 15px;
    }

    .tips-box ul {
        padding-left: 18px;
    }
}

/* Emergency Warning Signs Styles */
.emergency-warnings-container {
    margin: 20px 0;
    padding: 0;
}

.emergency-warnings-box {
    border: 2px solid #ff4444;
    border-radius: 8px;
    background: #fff;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.emergency-warnings-header {
    background: linear-gradient(135deg, #ff4444, #cc3333);
    color: white;
    padding: 15px 20px;
    border-radius: 6px 6px 0 0;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.emergency-warnings-content {
    padding: 0;
}

.warning-section {
    border-bottom: 1px solid #eee;
    margin: 0;
}

.warning-section:last-child {
    border-bottom: none;
}

.warning-level-header {
    padding: 15px 20px 10px;
    font-weight: 600;
    font-size: 15px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.warning-level-critical {
    background: #fff5f5;
    color: #cc0000;
    border-left: 4px solid #ff4444;
}

.warning-level-urgent {
    background: #fffbf0;
    color: #cc6600;
    border-left: 4px solid #ffa500;
}

.warning-level-info {
    background: #f0f8ff;
    color: #0066cc;
    border-left: 4px solid #2196f3;
}

.warning-items {
    padding: 0 20px 15px;
    margin: 0;
}

.warning-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    line-height: 1.5;
}

.warning-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.warning-text {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.action-required {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 4px;
}

.action-critical {
    background: #ff4444;
    color: white;
}

.action-urgent {
    background: #ffa500;
    color: white;
}

.action-info {
    background: #2196f3;
    color: white;
}

.warning-explanation {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 6px;
    padding-left: 15px;
}

/* Emergency Contact Section */
.emergency-contact {
    background: #f8f9fa;
    border-top: 1px solid #eee;
    padding: 15px 20px;
    text-align: center;
    border-radius: 0 0 6px 6px;
}

.emergency-contact-text {
    font-size: 13px;
    color: #666;
    margin: 0 0 8px 0;
}

.emergency-phone {
    font-weight: 600;
    color: #ff4444;
    font-size: 16px;
}

/* Responsive Design for Emergency Warnings */
@media only screen and (max-width: 600px) {
    .emergency-warnings-header {
        padding: 12px 15px;
        font-size: 15px;
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    .warning-level-header {
        padding: 12px 15px 8px;
        font-size: 14px;
    }

    .warning-items {
        padding: 0 15px 12px;
    }

    .warning-item {
        padding: 6px 0;
        font-size: 13px;
    }

    .warning-text {
        margin-bottom: 3px;
    }

    .action-required {
        font-size: 11px;
        padding: 3px 6px;
    }

    .warning-explanation {
        font-size: 11px;
        margin-top: 4px;
    }

    .emergency-contact {
        padding: 12px 15px;
    }

    .emergency-contact-text {
        font-size: 12px;
    }

    .emergency-phone {
        font-size: 15px;
    }
}

/* Care Tips Section Styles */
.care-tips-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #28a745;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.care-tips-section h4 {
    color: #28a745;
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.care-tips-section h4::before {
    content: "🌟";
    font-size: 20px;
}

.care-tips-category {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 15px;
    margin: 12px 0;
    border: 1px solid rgba(40, 167, 69, 0.2);
    transition: all 0.3s ease;
}

.care-tips-category:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.care-tips-category h5 {
    color: #495057;
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.care-tips-category ul {
    margin: 0;
    padding-left: 20px;
}

.care-tips-category li {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    margin: 6px 0;
    transition: color 0.2s ease;
}

.care-tips-category li:hover {
    color: #495057;
}

/* Fallback tips styling */
.fallback-tips {
    border-left-color: #6c757d;
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
}

.fallback-tips h4 {
    color: #6c757d;
}

.fallback-tips h4::before {
    content: "💡";
}

/* Priority indicators for care tips */
.care-tips-section .priority-high {
    position: relative;
}

.care-tips-section .priority-high::before {
    content: "⚠️";
    margin-right: 5px;
}

/* Mobile responsiveness for care tips */
@media only screen and (max-width: 600px) {
    .care-tips-section {
        padding: 15px;
        margin: 15px 0;
    }

    .care-tips-section h4 {
        font-size: 16px;
    }

    .care-tips-category {
        padding: 12px;
        margin: 10px 0;
    }

    .care-tips-category h5 {
        font-size: 15px;
    }

    .care-tips-category li {
        font-size: 13px;
    }
}

/* Download Button and Modal Styles */
.dac-action-btn,
button.dac-action-btn,
#dacCalculateBtn,
#dacDownloadPdf {
    font-family: 'Segoe UI', sans-serif !important;
    font-size: 19px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    background: #055E91 !important;
    padding: 16px 24px !important;
    border-radius: 4px !important;
    max-width: 250px !important;
    margin: 20px auto 0 auto !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    animation: fadeInUp 0.6s ease-in-out;
    text-align: center !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: normal !important;
}

/* Popup modal buttons stay blue */
.dac-modal-card .dac-action-btn,
.dac-modal-card button.dac-action-btn {
    background: #008000 !important;
    margin-top: -1px !important;
}

.dac-modal-card .dac-action-btn:hover,
.dac-modal-card button.dac-action-btn:hover {
     background: #008000 !important;
}

.dac-action-btn:hover,
button.dac-action-btn:hover,
#dacCalculateBtn:hover,
#dacDownloadPdf:hover {
    background: #044a73 !important;
    transform: scale(1.03) !important;
}

.dac-download-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.signs-col ul,
.tips-col ul {
    list-style-type: disc;
    padding-left: 20px;
    margin: 10px 0;
}

.signs-col li,
.tips-col li {
    margin-bottom: 8px;
    padding-left: 5px;
    list-style-position: outside;
}

/* Modal for download options */
.dac-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.dac-modal-card {
    background: #fff;
    border-radius: 5px;
    width: 520px;
    max-width: calc(100% - 40px);
    box-shadow: 0 16px 40px rgba(2, 28, 12, 0.25);
    overflow: hidden;
}

.dac-modal-header {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #055B6A;
    color: #fff;
    border-radius: 0;
    position: relative;
    /* For proper cross icon positioning */
}

.dac-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    font-weight: 700;
}

.dac-modal-close {
    border: none !important;
    background: #fff !important;
    color: #f08f23 !important;
    font-size: 24px !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    position: absolute !important;
    right: 15px !important;
    top: 18px !important;
    /* Fixed position: header padding (14px) + center adjustment (4px) */
    transform: none !important;
    /* Remove any transform conflicts */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Make sure icon color applies to any child elements (FontAwesome icons, etc.) */
.dac-modal-close *,
.dac-modal-close i,
.dac-modal-close::before,
.dac-modal-close::after {
    color: #f08f23 !important;
}

.dac-modal-header+.dac-modal-body {
    padding-top: 20px;
}

.dac-modal-body {
    padding: 18px 20px;
}

.dac-modal-row {
    margin-bottom: 14px;
}

.dac-modal-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600
}

.dac-modal-row input[type="file"],
.dac-modal-row input[type="text"],
.dac-modal-row input[type="email"] {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb
}

.dac-modal-card .dac-file-input {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dac-modal-card .dac-file-btn {
    background: #055B6A !important;
    color: #fff !important;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 110px;
}

.dac-modal-card .dac-file-btn:hover {
    background: #044955 !important;
}

.dac-modal-card .dac-file-name {
    display: inline-block;
    max-width: 240px;
    color: #374151;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    align-self: center;
    margin-left: 8px;
}

.dac-modal-actions .dac-action-primary,
.dac-modal-actions .dac-action-secondary {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    height: 48px !important;
    padding: 0 18px !important;
    line-height: 1 !important;
}

.dac-modal-actions {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    justify-content: center;
    align-items: center;
}

.dac-action-primary,
.dac-action-secondary {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
}

.dac-modal-actions .dac-action-primary,
.dac-modal-actions .dac-action-secondary {
    flex: 1 1 0;
    min-width: 120px;
    max-width: 260px;
}

.dac-action-primary {
    background: #055E91;
    color: #fff;
    border: none;
}

.dac-action-primary:hover {
    background: #044a73
}

.dac-action-secondary {
    background: #fff;
    color: #055E91;
    border: 2px solid #e6eef5
}

.dac-action-secondary:hover {
    background: #f7fbfd
}

.dac-image-preview img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin-top: 8px;
}

.dac-circular-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 12px auto 0;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
    background-color: #f9fafb;
}

.dac-note {
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px
}

#dacGenerateNameLink {
    font-weight: 700;
    font-size: 14px;
    color: #0b6aa0;
    text-decoration: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================ */
/* Breed Combo Box (Dropdown + Search) */
/* ============================ */
.dpc-breed-combobox-container {
    position: relative !important;
    width: 100%;
    margin-bottom: 15px;
}

.dpc-combobox-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.dpc-combobox-input {
    width: 100%;
    padding: 12px 40px 12px 12px !important;
    font-size: 16px !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: border-color 0.2s !important;
    background-color: #fff !important;
    line-height: 1.5 !important;
    height: auto !important;
    box-sizing: border-box !important;
}

.dpc-combobox-input:focus {
    border-color: #2271b1 !important;
    outline: none !important;
}

.dpc-combobox-arrow {
    position: absolute !important;
    right: 15px !important;
    top: 40% !important;
    transform: translateY(-50%) !important;
    color: #666 !important;
    pointer-events: none !important;
    font-size: 12px !important;
    line-height: 1 !important;
    transition: transform 0.2s ease !important;
    z-index: 2 !important;
    width: 12px !important;
    height: 12px !important;
    display: inline-block !important;
}

.dpc-breed-combobox-container.open .dpc-combobox-arrow {
    transform: translateY(-50%) rotate(180deg) !important;
}

.dpc-breed-dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
    border: none !important;
    border-radius: 0 0 8px 8px !important;
    box-shadow: none !important;
    z-index: 10000 !important;
    transition: max-height 0.3s ease, border 0.3s ease, box-shadow 0.3s ease !important;
    margin-top: 0 !important;
}

.dpc-breed-combobox-container.open .dpc-breed-dropdown-menu {
    max-height: 300px !important;
    overflow-y: auto !important;
    border: 2px solid #ddd !important;
    border-top: 2px solid #ddd !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
    margin-top: -2px !important;
}

.dpc-breed-search-results {
    max-height: 280px !important;
    overflow-y: auto !important;
}

.dpc-breed-option {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    font-size: 15px;
}

.dpc-breed-option:hover,
.dpc-breed-option.highlighted {
    background: #f0f6fc;
    color: #2271b1;
    font-weight: 500;
}

.dpc-breed-option:last-child {
    border-bottom: none;
}

.dpc-breed-option .breed-info {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 3px;
    font-weight: normal;
}

.dpc-loading,
.dpc-no-results {
    padding: 15px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dpc-combobox-input {
        padding: 10px 35px 10px 10px;
        font-size: 14px;
    }

    .dpc-combobox-arrow {
        right: 10px;
        font-size: 12px;
    }

    .dpc-breed-dropdown-menu {
        max-height: 250px;
    }

    .dpc-breed-combobox-container.open .dpc-breed-dropdown-menu {
        max-height: 250px;
    }
}

/* === Responsive Fix for Headings (Mobile) === */
@media only screen and (max-width: 600px) {
    .dog-pregnancy-calculator h3 {
        flex-wrap: wrap;
        line-height: 1.4;
    }

    .dog-pregnancy-calculator h3 span {
        font-size: 13px !important;
        font-weight: normal !important;
        color: #666;
    }
}