@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.baby-registration-form {
    max-width: 500px;
    margin: 0 auto;
    /* padding: 0 1.5rem; */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.baby-registration-form h2 {
    color: #1a3772;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    text-align: left;
    letter-spacing: -0.025em;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1a3772;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* File Upload Styling */
.file-upload-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-upload-button {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    background: #1a3772;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s;
    width: 100%;
    max-width: 200px;
}

.file-upload-text {
    color: #6b7280;
    font-size: 0.9rem;
    word-break: break-all;
}

/* Terms Checkbox */
.terms-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.terms-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #1a3772;
}

.terms-group label {
    margin: 0;
    font-weight: 400;
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.4;
}

.terms-link {
    color: #1a3772;
    text-decoration: underline;
    font-weight: 500;
}

/* Submit Button */
.submit-button {
    background: #1a3772;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
    margin-top: 0.5rem;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.modal-content {
    background: white;
    margin: 5rem auto;
    padding: 0;
    width: 90%;
    max-width: 700px;
    border-radius: 12px;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #1a3772;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-body {
    padding: 0 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.terms-content {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #374151;
    padding: 1rem 0;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    position: sticky;
    bottom: 0;
    background: white;
    text-align: center;
}

.close {
    color: #6b7280;
    font-size: 1.75rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    padding: 0.5rem;
}

.close:hover {
    color: #1a3772;
    transform: scale(1.1);
}

/* In your theme's stylesheet or inline */
.form-message {
    min-height: 50px;
    margin: 20px 0;
    padding: 15px;
    display: block !important; /* Force show */
    visibility: visible !important;
    opacity: 1 !important;
}

/* Success message styling */
.success-message {
    background: #e8f5e9;
    border-left: 4px solid #2e7d32;
    padding: 15px;
    margin: 15px 0;
    color: #155724;
}
.error-message {
    background: #ffebee !important;
    border-left: 4px solid #c62828;
    padding: 15px;
    margin: 15px 0;
}

/* Success Modal Styles */
#success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

#success-modal .modal-content {
    background: white;
    margin: 5rem auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    margin: 0 auto;
    position: relative;
}

.success-modal-content {
    text-align: center;
}

.success-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.success-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    text-align: left;
}

.close-success-modal {
    background: #2e7d32;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.close-success-modal:hover {
    background: #1b5e20;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ensure form messages are visible */
.form-message div {
    display: block !important;
}
.accept-terms {
    background: #1a3772;
    color: white;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 250px;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.accept-terms:hover {
    background: #153060;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}


@media (max-width: 768px) {
    .form-group select {
        background-color: #1a3772 !important;
        color: white !important;
        padding: 0.875rem 1rem !important;
        border: none !important;
    }
    
    /* Style the dropdown arrow */
    .form-group select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
        background-position: right 0.75rem center !important;
        background-repeat: no-repeat !important;
        background-size: 16px 12px !important;
    }
    
    /* Style the select box when focused */
    .form-group select:focus {
        outline: none !important;
        box-shadow: 0 0 0 2px rgba(255,255,255,0.3) !important;
    }
    
    /* Style the options dropdown */
    .form-group select option {
        background: white !important;
        color: #1a3772 !important;
        padding: 10px !important;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 1rem auto;
    }
    
    .modal-header {
        padding: 1.25rem;
    }
    
    .modal-body {
        padding: 0 1.25rem;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 0 1rem;
    }
    
    .terms-content {
        font-size: 0.85rem;
    }
    
    .close {
        font-size: 1.5rem;
    }
    
    .accept-terms {
        padding: 0.75rem;
        max-width: 100%;
    }
}
/* Loading State */
.submit-button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.submit-button.loading:after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==============================================
   Image Upload Form Specific Styles
   ============================================== */

.baby-upload-form {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.upload-instructions {
    color: #555;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.upload-instructions small {
    display: block;
    margin-top: 0.5rem;
    color: #777;
    font-size: 0.85rem;
}

.upload-fields {
    margin-bottom: 1.5rem;
}

.upload-group {
    margin-bottom: 1.5rem;
}

.file-input-wrapper {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.file-input-wrapper input[type="file"] {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.file-input-button {
    padding: 0.6rem 1rem;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    transition: all 0.2s;
    color: #1a3772;
    font-weight: 500;
}

.file-input-button:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

.file-name {
    font-size: 0.9rem;
    color: #666;
    flex-grow: 1;
}

.upload-progress {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
    display: none;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: #1a3772;
    transition: width 0.3s;
}

.progress-text {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.3rem;
    text-align: center;
}

.submit-group {
    margin-top: 2rem;
}

.submit-button .spinner {
    visibility: hidden;
    display: inline-block;
    margin-left: 0.5rem;
    vertical-align: middle;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}

.upload-message {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    display: none;
}

.upload-message.success {
    background: #e8f5e9;
    border-left: 4px solid #4CAF50;
    color: #2e7d32;
}

.upload-message.error {
    background: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
}

.upload-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.upload-success-modal .modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.upload-success-modal .success-icon {
    font-size: 3rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.upload-success-modal h3 {
    margin: 0 0 1rem 0;
    color: #333;
}

.upload-success-modal button {
    padding: 0.75rem 1.5rem;
    background: #1a3772;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1.5rem;
    transition: all 0.2s;
}

.upload-success-modal button:hover {
    background: #142d5c;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .baby-upload-form {
        padding: 1.5rem;
    }
    
    .file-input-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-input-button {
        margin-bottom: 0.5rem;
        margin-right: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .baby-upload-form {
        padding: 1rem;
    }
    
    .upload-group {
        margin-bottom: 1rem;
    }
}

/* Multiple file upload styles */
.file-names {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
    max-height: 100px;
    overflow-y: auto;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.file-names::-webkit-scrollbar {
    width: 5px;
}

.file-names::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 5px;
}

.file-input-wrapper input[type="file"][multiple] {
    height: auto;
}