/**
 * JBU Voting Registration Form Styles
 */

/* Container */
.jbu-voting-registration-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Title */
.jbu-voting-registration-title {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    text-align: center;
}

/* Description */
.jbu-voting-registration-description {
    margin: 0 0 30px 0;
    font-size: 16px;
    color: #666;
    text-align: center;
    line-height: 1.6;
}

/* Form */
.jbu-voting-registration-form {
    margin: 0;
}

/* Form rows */
.jbu-voting-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.jbu-voting-form-row .jbu-voting-form-group {
    margin-bottom: 0;
}

/* Form groups */
.jbu-voting-form-group {
    margin-bottom: 20px;
}

.jbu-voting-form-group-half {
    flex: 1;
}

/* Labels */
.jbu-voting-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.jbu-voting-form-label .required {
    color: #e74c3c;
}

.jbu-voting-form-label .optional {
    color: #666;
    font-weight: 400;
    font-style: italic;
}

/* Input fields */
.jbu-voting-form-input,
.jbu-voting-form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

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

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

/* Checkboxes */
.jbu-voting-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.jbu-voting-checkbox {
    margin: 0;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.jbu-voting-checkbox-text {
    color: #333;
}

.jbu-voting-checkbox-text a {
    color: #3498db;
    text-decoration: none;
}

.jbu-voting-checkbox-text a:hover {
    text-decoration: underline;
}

/* Newsletter options */
.jbu-voting-newsletter-options {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background: #f9f9f9;
}

.jbu-voting-newsletter-options .jbu-voting-checkbox-label {
    margin-bottom: 8px;
}

.jbu-voting-newsletter-options .jbu-voting-checkbox-label:last-child {
    margin-bottom: 0;
}

/* Terms checkbox */
.jbu-voting-terms-label {
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-bottom: 0;
}

/* Help text */
.jbu-voting-form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Submit button */
.jbu-voting-form-submit {
    width: 100%;
    padding: 15px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.jbu-voting-form-submit:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.jbu-voting-form-submit:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.jbu-voting-form-submit-loading {
    background: #bdc3c7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Submit button states */
.jbu-voting-submit-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Spinner */
.jbu-voting-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: jbu-spin 1s linear infinite;
}

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

/* Error messages */
.jbu-voting-form-error {
    display: none;
    margin-top: 5px;
    font-size: 12px;
    color: #e74c3c;
    font-weight: 500;
}

.jbu-voting-form-error-general {
    padding: 15px;
    background: #fdeaea;
    border: 1px solid #e74c3c;
    border-radius: 4px;
    color: #e74c3c;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Success messages */
.jbu-voting-form-success {
    padding: 15px;
    background: #eaf4fd;
    border: 1px solid #3498db;
    border-radius: 4px;
    color: #2980b9;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
    .jbu-voting-registration-container {
        margin: 10px;
        padding: 15px;
    }
    
    .jbu-voting-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .jbu-voting-form-row .jbu-voting-form-group {
        margin-bottom: 20px;
    }
    
    .jbu-voting-registration-title {
        font-size: 24px;
    }
    
    .jbu-voting-registration-description {
        font-size: 14px;
    }
    
    .jbu-voting-form-input,
    .jbu-voting-form-select {
        padding: 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .jbu-voting-form-submit {
        padding: 12px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .jbu-voting-registration-container {
        margin: 5px;
        padding: 10px;
    }
    
    .jbu-voting-newsletter-options {
        padding: 10px;
    }
    
    .jbu-voting-terms-label {
        padding: 10px;
    }
    
    .jbu-voting-checkbox-label {
        font-size: 13px;
    }
}