/**
 * Bilinc Public Styles
 * Styling for customer-facing application forms and interfaces
 */

/* Application Wrapper */
.bilinc-application-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Introduction Section */
.bilinc-application-intro {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #ff6b35;
}

.bilinc-application-intro h2 {
    color: #333;
    font-size: 32px;
    margin-bottom: 10px;
}

.bilinc-application-intro .lead {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

/* Requirements Box */
.bilinc-requirements {
    background: #fff3e0;
    border-left: 4px solid #ff6b35;
    padding: 20px;
    margin: 20px 0;
}

.bilinc-requirements h3 {
    color: #ff6b35;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 15px;
}

.bilinc-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bilinc-requirements li {
    padding: 8px 0;
    font-size: 16px;
    color: #333;
}

.bilinc-requirements strong {
    color: #ff6b35;
}

/* Qualified Box */
.bilinc-qualified {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 20px;
    margin: 20px 0;
}

.bilinc-qualified h4 {
    color: #4caf50;
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 15px;
}

.bilinc-qualified ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bilinc-qualified li {
    padding: 5px 0;
    padding-left: 25px;
    position: relative;
}

.bilinc-qualified li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4caf50;
    font-weight: bold;
}

/* Form Sections */
.form-section {
    margin-bottom: 40px;
    padding: 30px;
    background: #fafafa;
    border-radius: 6px;
}

.form-section h3 {
    color: #333;
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6b35;
}

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

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

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group.full {
    flex: 0 0 100%;
}

.form-group.half {
    flex: 0 0 calc(50% - 10px);
}

.form-group.third {
    flex: 0 0 calc(33.333% - 14px);
}

/* Labels */
.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Inputs */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s;
    width: 100%;
    box-sizing: border-box;
    background-color: white;
    display: block !important;
    visibility: visible !important;
}

/* CRITICAL: Override any theme CSS trying to hide selects */
.bilinc-application-form select,
.bilinc-application-form .form-group select,
select.bilinc-select,
#bilinc-app-wrapper select,
#bilinc-application-form select {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    clip: auto !important;
    clip-path: none !important;
    width: 100% !important;
    height: auto !important;
    pointer-events: auto !important;
}

/* Select specific styles */
.form-group select,
.bilinc-select {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 20px;
    padding-right: 35px;
    cursor: pointer;
    height: auto !important;
    min-height: 45px !important;
}

/* Force select to show options on all browsers */
.form-group select option {
    padding: 8px;
    background-color: white;
    color: #333;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b35;
}

.form-group small {
    margin-top: 5px;
    font-size: 12px;
    color: #777;
}

/* Textarea */
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Important Notice */
.bilinc-notice {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 20px;
    margin: 30px 0;
}

.bilinc-notice p {
    margin: 10px 0;
    color: #333;
}

.bilinc-notice strong {
    color: #2196f3;
}

/* Submit Section */
.form-submit {
    text-align: center;
    margin-top: 30px;
}

.bilinc-submit-btn {
    background: #ff6b35;
    color: white;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 200px;
}

.bilinc-submit-btn:hover {
    background: #e55d2d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

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

/* Messages */
.bilinc-form-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    font-size: 16px;
}

.bilinc-form-message.success {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.bilinc-form-message.error {
    background: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group.half,
    .form-group.third {
        flex: 0 0 100%;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .bilinc-application-intro h2 {
        font-size: 26px;
    }
    
    .bilinc-submit-btn {
        width: 100%;
    }
}

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

.button-loading:after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
