/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

.bgba-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.bgba-form-wrapper h2 {
    text-align: center;
    color: #000000; /* Black */
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
}

.bgba-form-wrapper .bgba-container {
    background: #ffffff; /* White */
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); /* Soft black shadow */
    padding: 40px;
    border: 1px solid #cccccc; /* Light grey border */
}

/* Form Styles */
#bgba-application-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bgba-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.bgba-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bgba-form-label {
    font-weight: 600;
    color: #333333; /* Dark grey */
    font-size: 14px;
    margin-bottom: 5px;
}

.bgba-form-group.bgba-required .bgba-form-label::after {
    content: " *";
    color: #555555; /* Medium grey for asterisk */
    font-weight: bold;
}

.bgba-optional-text {
    font-weight: 400;
    color: #777777; /* Medium-light grey */
    font-size: 12px;
}

.bgba-form-input,
.bgba-form-select {
    padding: 12px 16px;
    border: 2px solid #dddddd; /* Light grey border */
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #ffffff; /* White background */
    color: #000000; /* Black text */
}

.bgba-form-input:focus,
.bgba-form-select:focus {
    outline: none;
    border-color: #555555; /* Medium grey focus border */
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05); /* Subtle black shadow */
}

.bgba-form-input.bgba-error,
.bgba-form-select.bgba-error {
    border-color: #333333; /* Dark grey for error */
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1); /* Darker shadow for error */
}

.bgba-form-select[multiple] {
    min-height: 120px;
    padding: 8px;
}

.bgba-form-select[multiple] option {
    padding: 8px;
    margin: 2px 0;
    border-radius: 4px;
}

.bgba-form-select[multiple] option:checked {
    background: #333333; /* Dark grey for selected option */
    color: #ffffff; /* White text */
}

/* Social Media Fields */
.bgba-add-social-btn {
    background: #444444; /* Dark grey button */
    color: #ffffff; /* White text */
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    margin-top: 8px;
    align-self: flex-start;
}

.bgba-add-social-btn:hover {
    background: #222222; /* Darker grey on hover */
}

.bgba-social-link-group {
    margin-top: 15px;
    padding: 15px;
    background: #f0f0f0; /* Very light grey background */
    border-radius: 8px;
    border: 1px solid #dddddd; /* Light grey border */
}

.bgba-social-link-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: center;
}

.bgba-remove-social-link {
    background: #777777; /* Medium grey remove button */
    color: #ffffff; /* White text */
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.bgba-remove-social-link:hover {
    background: #555555; /* Darker grey on hover */
}

/* Submit Button */
.bgba-submit-btn {
    background: linear-gradient(135deg, #333333 0%, #000000 100%); /* Black/Dark grey gradient */
    color: #ffffff; /* White text */
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bgba-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); /* Softer black shadow */
}

.bgba-submit-btn:disabled {
    background: #aaaaaa; /* Light grey for disabled */
    color: #555555; /* Darker grey text for disabled */
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Messages */
#bgba-form-messages {
    margin-top: 20px;
}

.bgba-success-message {
    background: #e0e0e0; /* Light grey background */
    color: #000000; /* Black text */
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #cccccc; /* Medium grey border */
    font-weight: 500;
    text-align: center;
}

.bgba-error-message {
    background: #333333; /* Dark grey background */
    color: #ffffff; /* White text */
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #000000; /* Black border */
    font-weight: 500;
    text-align: center;
}

/* Hidden honeypot field */
.bgba-hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bgba-form-wrapper {
        padding: 15px;
    }
    
    .bgba-form-wrapper .bgba-container {
        padding: 25px;
    }
    
    .bgba-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .bgba-social-link-inputs {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .bgba-form-wrapper h2 {
        font-size: 24px;
    }
    
    .bgba-submit-btn {
        font-size: 16px;
        padding: 14px 28px;
    }
}

@media (max-width: 480px) {
    .bgba-form-wrapper {
        padding: 10px;
    }
    
    .bgba-form-wrapper .bgba-container {
        padding: 20px;
    }
    
    .bgba-form-wrapper h2 {
        font-size: 22px;
        margin-bottom: 25px;
    }
    
    .bgba-form-input,
    .bgba-form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Custom styling for select multiple */
.bgba-form-select[multiple] {
    background-image: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Focus states for accessibility */
.bgba-form-input:focus,
.bgba-form-select:focus,
.bgba-submit-btn:focus,
.bgba-add-social-btn:focus,
.bgba-remove-social-link:focus {
    outline: 2px solid #000000; /* Black outline for focus */
    outline-offset: 2px;
}

/* Loading state */
.bgba-submit-btn.bgba-loading {
    position: relative;
    color: transparent;
}

.bgba-submit-btn.bgba-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #555555; /* Dark grey spinner */
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Improved form validation styling */
.bgba-form-group.bgba-has-error .bgba-form-input,
.bgba-form-group.bgba-has-error .bgba-form-select {
    border-color: #333333; /* Dark grey border for error */
    background-color: #f5f5f5; /* Light grey background for error */
}

.bgba-form-group.bgba-has-success .bgba-form-input,
.bgba-form-group.bgba-has-success .bgba-form-select {
    border-color: #555555; /* Medium grey border for success */
    background-color: #f9f9f9; /* Very light grey background for success */
}

/* Placeholder styling */
.bgba-form-input::placeholder {
    color: #aaaaaa; /* Light grey placeholder */
    opacity: 1;
}

.bgba-form-input::-webkit-input-placeholder {
    color: #aaaaaa; /* Light grey placeholder */
}

.bgba-form-input::-moz-placeholder {
    color: #aaaaaa; /* Light grey placeholder */
    opacity: 1;
}

.bgba-form-input:-ms-input-placeholder {
    color: #aaaaaa; /* Light grey placeholder */
}
