/* HMFL Registration Form Styles */

.hmfl-registration-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.hmfl-registration-form {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-bottom: 30px;
}

.hmfl-registration-form h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group {
    flex: 1;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #2c3e50;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group input.error,
.form-group select.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Field-specific error messages */
.field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
    display: block;
}

/* Field-specific success messages */
.field-success {
    color: #27ae60;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
    display: block;
}

/* Checkbox error styling */
.checkbox-label input[type="checkbox"].error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group input:read-only {
    background-color: #f8f9fa;
    color: #6c757d;
}

.mobile-input-group,
.otp-input-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

/* Desktop: Show everything in one row */
.mobile-input-group {
    flex-direction: row;
    gap: 0;
}

.mobile-number-row {
    display: flex;
    flex-direction: row;
    gap: 0;
    align-items: stretch;
    flex: 1;
}

.mobile-input-group input,
.otp-input-group input {
    flex: 1;
}

.mobile-prefix {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid #e1e8ed;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
    min-width: 50px;
    text-align: center;
    flex-shrink: 0;
}

.mobile-input-group input,
.mobile-input-group .mobile-number-row input {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

.mobile-input-group input:focus,
.mobile-input-group .mobile-number-row input:focus {
    border-left: 2px solid #3498db;
}

.mobile-input-group input.error,
.mobile-input-group .mobile-number-row input.error {
    border-left: 2px solid #e74c3c;
}

.btn-send-otp,
.btn-verify-otp {
    padding: 17px 20px;
    background: #ffcc00;
    color: #000000;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
    text-align: center;
    display: inline-block;
    line-height: 1.2;
    flex-shrink: 0;
}

.btn-send-otp,
.btn-verify-otp {
    margin-left: 10px;
}

.btn-send-otp:hover,
.btn-verify-otp:hover {
    background: #000000;
    color: #ffcc00;
    transform: translateY(-1px);
}

.btn-send-otp:disabled,
.btn-verify-otp:disabled {
    background: #6c757d;
    color: #ffffff;
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    border: 1px solid #dee2e6;
}

.btn-verify-otp.verified {
    background: #ffcc00;
    color: #000000 !important;
    cursor: default;
    transform: none;
    box-shadow: 0 2px 8px rgba(255, 204, 0, 0.3);
    font-weight: 600;
    min-width: 140px;
    text-align: center;
    padding: 17px 20px;
    border: 2px solid #ffcc00;
}

.btn-verify-otp.verified:hover {
    background: #ffcc00;
    transform: none;
    color: #000000 !important;
}

.btn-submit {
    width: 100%;
    padding: 16px 24px;
    background: #ffcc00;
    color: #000000;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-submit:hover {
    background: #000000;
    color: #ffcc00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-submit:disabled {
    background: #6c757d;
    color: #ffffff;
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border: 1px solid #dee2e6;
}

.checkbox-group {
    margin-top: 20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    color: #2c3e50;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
    margin-top: 2px;
}

.form-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

.otp-section {
    background: #f8f9fa;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

#hmfl-messages {
    margin-top: 20px;
}

.message {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 10px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    font-weight: 600;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.message.success small {
    font-weight: normal;
    opacity: 0.8;
    margin-top: 8px;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    position: relative;
    padding-right: 40px;
}

.message-close {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.message-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hmfl-registration-container {
        padding: 10px;
    }
    
    .hmfl-registration-form {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .mobile-input-group {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .otp-input-group {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .mobile-number-row {
        display: flex;
        flex-direction: row;
        gap: 0;
        align-items: stretch;
    }
    
    .mobile-prefix {
        border-radius: 8px 0 0 8px;
        border-right: none;
        border-bottom: 2px solid #e1e8ed;
        min-width: 50px;
        justify-content: center;
        padding: 10px 16px;
        flex-shrink: 0;
    }
    
    .mobile-input-group .mobile-number-row input {
        border-radius: 0 8px 8px 0;
        border-left: none;
        border-top: 2px solid #e1e8ed;
        margin: 0;
    }
    
    .mobile-input-group .mobile-number-row input:focus {
        border-top: 2px solid #3498db;
        border-left: 2px solid #3498db;
    }
    
    .mobile-input-group .mobile-number-row input.error {
        border-top: 2px solid #e74c3c;
        border-left: 2px solid #e74c3c;
    }
    
    .btn-send-otp,
    .btn-verify-otp {
        width: 100%;
        min-width: auto;
        margin-left: 0;
        margin-top: 0;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .otp-input-group input {
        border-radius: 8px;
        border: 2px solid #e1e8ed;
        margin-bottom: 5px;
    }
    
    .otp-input-group input:focus {
        border-color: #3498db;
    }
    
    .otp-input-group input.error {
        border-color: #e74c3c;
    }
    
    .hmfl-registration-form h2 {
        font-size: 24px;
    }
    
    .form-help {
        font-size: 11px;
        margin-top: 4px;
    }
}

@media (max-width: 480px) {
    .hmfl-registration-form {
        padding: 15px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .mobile-prefix {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 45px;
    }
    
    .btn-send-otp,
    .btn-verify-otp {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 44px; /* Better touch target */
    }
    
    .btn-submit {
        padding: 14px 20px;
        font-size: 16px;
        min-height: 48px; /* Better touch target */
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .hmfl-registration-form h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .checkbox-label {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .checkbox-label input[type="checkbox"] {
        min-width: 18px;
        min-height: 18px;
    }
    
    .otp-section {
        padding: 15px;
        margin: 15px 0;
    }
}

@media (max-width: 360px) {
    .hmfl-registration-container {
        padding: 5px;
    }
    
    .hmfl-registration-form {
        padding: 12px;
    }
    
    .form-group input,
    .form-group select {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .mobile-prefix {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 40px;
    }
    
    .btn-send-otp,
    .btn-verify-otp {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 40px;
    }
    
    .btn-submit {
        padding: 12px 16px;
        font-size: 15px;
        min-height: 44px;
    }
    
    .form-group label {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .hmfl-registration-form h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .checkbox-label {
        font-size: 12px;
        line-height: 1.3;
    }
}

/* Loading states */
.btn-send-otp:disabled:not(.verified):not(.verifying):not(.sending),
.btn-verify-otp:disabled:not(.verified):not(.verifying):not(.sending),
.btn-submit:disabled.submitting {
    position: relative;
    color: #ffffff !important;
    background: #6c757d !important;
}

.btn-send-otp:disabled:not(.verified):not(.verifying):not(.sending)::after,
.btn-verify-otp:disabled:not(.verified):not(.verifying):not(.sending)::after,
.btn-submit:disabled.submitting::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Countdown timer state - make it more visible */
.btn-send-otp:disabled:not(.sending):not(.verifying) {
    background: #6c757d !important;
    color: #ffffff !important;
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
    border: 1px solid #dee2e6;
}

/* Verifying state - ensure text is visible */
.btn-verify-otp.verifying {
    color: #000000 !important;
    background: #ffcc00 !important;
    cursor: not-allowed;
    opacity: 0.9;
}

/* Sending state - ensure text is visible */
.btn-send-otp.sending {
    color: #000000 !important;
    background: #ffcc00 !important;
    cursor: not-allowed;
    opacity: 0.9;
}

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

/* Focus styles for accessibility */
.form-group input:focus,
.form-group select:focus,
.btn-send-otp:focus,
.btn-verify-otp:focus,
.btn-submit:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Status indicators */
.status-new {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-processed {
    background: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-disqualified {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* Expired registration message */
.hmfl-expired-message {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    margin: 20px 0;
}

.hmfl-expired-message p {
    margin: 0 0 15px 0;
    color: #6c757d;
    font-size: 16px;
    line-height: 1.6;
}

.hmfl-expired-message p:first-child {
    color: #dc3545;
    font-weight: 600;
    font-size: 18px;
}

.hmfl-expired-message p:last-child {
    margin-bottom: 0;
    color: #495057;
    font-style: italic;
} 