/**
 * Transfer Certificates - Public CSS
 * Primary Color: #976045
 * Secondary Color: #0E5C31
 * Font: Plus Jakarta Sans
 */

/* Font Integration */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* Elementor Compatibility */
.elementor-widget-container .transfer-certificates-container {
    width: 100%;
}

.transfer-certificates-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333;
}

.transfer-certificates-container h2 {
    /* inherit Elementor global styles; do not hardcode color */
    margin-bottom: 20px;
    text-align: left;
    font-weight: 600;
}

.tc-form-container {
    background: #fff;
    border-radius: 0;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(151, 96, 69, 0.1);
    border: 1px solid rgba(151, 96, 69, 0.1);
    position: relative; /* ensure stacked context for datepicker */
}

.tc-form .form-group {
    margin-bottom: 24px;
}

.transfer-certificates-container .tc-form .tc-form-row {
    display: flex !important;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
    align-items: flex-start;
    width: 100%;
}

.transfer-certificates-container .tc-form .tc-form-row .form-group {
    flex: 1 1 calc(50% - 12px) !important;
    max-width: calc(50% - 12px) !important;
    width: calc(50% - 12px) !important;
    min-width: 240px;
    margin-bottom: 0 !important;
    box-sizing: border-box;
}

.tc-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.tc-form label .required {
    color: #976045; /* Primary color */
}

.tc-form input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 16px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all 0.3s ease;
}

.tc-form input[type="text"]:focus {
    border-color: #976045; /* Primary color */
    outline: none;
    box-shadow: 0 0 0 2px rgba(151, 96, 69, 0.2);
}

.dob-preview {
    margin: 0;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.dob-preview.is-visible {
    margin-top: 8px;
}

.tc-submit-btn, .tc-download-btn {
    background: #976045 !important; /* Primary color */
    color: white !important;
    border: none !important;
    padding: 14px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    text-decoration: none !important;
}

.tc-submit-btn:hover, .tc-download-btn:hover {
    background: #7d503a !important; /* Darker primary */
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(151, 96, 69, 0.2) !important;
}

.tc-download-btn {
    background: #0E5C31 !important; /* Secondary color */
    margin-top: 15px !important;
    display: inline-block !important;
    text-align: center !important;
}

.tc-download-btn:hover {
    background: #0a4a28; /* Darker secondary */
    box-shadow: 0 4px 8px rgba(14, 92, 49, 0.2);
}

.tc-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.tc-result {
    margin-top: 30px;
    text-align: left;
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.tc-result-inner {
    display: none;
}

.tc-success h3 {
    color: #976045 !important; /* Primary brown color */
    font-weight: 600 !important;
}

.tc-error h3 {
    color: #976045 !important; /* Primary brown color */
    font-weight: 600 !important;
}

.tc-download-container {
    margin-top: 24px;
}

.tc-download-btn {
    display: inline-block;
    background: #0E5C31; /* Secondary color */
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.tc-download-btn:hover {
    background: #0a4a28; /* Darker secondary */
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(14, 92, 49, 0.2);
}

.tc-try-again-btn {
    background: #976045; /* Primary color */
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.tc-try-again-btn:hover {
    background: #7d503a; /* Darker primary */
    transform: translateY(-2px);
}

/* Responsive styles */
@media (max-width: 768px) {
    .tc-form-container {
        padding: 20px 15px;
    }
    
    .transfer-certificates-container .tc-form .tc-form-row {
        flex-direction: column !important;
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .transfer-certificates-container .tc-form .tc-form-row .form-group {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        min-width: 0;
        margin-bottom: 0 !important;
    }
    
    .transfer-certificates-container {
        padding: 15px;
    }
    
    .tc-submit-btn, .tc-download-btn, .tc-try-again-btn {
        width: 100%;
        padding: 12px 20px;
    }
}

/* Elementor Widget Compatibility */
.elementor-widget .transfer-certificates-container {
    padding: 0;
}

/* Mobile Optimization */
@media (max-width: 480px) {
    .tc-form input[type="text"] {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .tc-form label {
        font-size: 14px;
    }
    
    .tc-success, .tc-error {
        padding: 20px 15px;
    }
}
