/* =============================================
   OSS VAT Compliance — Front-office Styles
   ============================================= */

/* ---- Section B2B ---- */
.oss-b2b-registration {
    margin: 20px 0;
    padding: 0;
}

/* ---- Toggle "Je suis un professionnel" ---- */
.oss-b2b-toggle {
    margin-bottom: 15px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.oss-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    margin: 0;
    color: #333;
    font-size: 14px;
}

.oss-toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2196F3;
    cursor: pointer;
}

/* ---- Champs B2B ---- */
.oss-b2b-fields {
    padding: 16px;
    background: #fafbfc;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 15px;
    animation: ossSlideDown 0.3s ease;
}

@keyframes ossSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.oss-field-group {
    margin-bottom: 14px;
}

.oss-field-group:last-of-type {
    margin-bottom: 8px;
}

.oss-field-group .form-control-label {
    font-weight: 500;
    font-size: 13px;
    color: #444;
    margin-bottom: 4px;
    display: block;
}

.oss-field-group .form-control {
    border-radius: 4px;
    border: 1px solid #ccc;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.oss-field-group .form-control:focus {
    border-color: #2196F3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.15);
}

/* ---- Wrapper TVA + bouton ---- */
.oss-vat-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.oss-vat-input-wrapper .form-control {
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 14px;
}

.oss-check-btn {
    white-space: nowrap;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    background: #2196F3;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    min-width: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oss-check-btn:hover:not(:disabled) {
    background: #1976D2;
}

.oss-check-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.oss-vat-hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #888;
}

/* ---- Spinner ---- */
.oss-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ossSpin 0.6s linear infinite;
}

@keyframes ossSpin {
    to { transform: rotate(360deg); }
}

/* ---- Input validation states ---- */
.oss-input-valid {
    border-color: #4CAF50 !important;
    background-color: #f1f8e9 !important;
}

.oss-input-error {
    border-color: #f44336 !important;
    background-color: #fef2f2 !important;
}

/* ---- Résultat VIES ---- */
.oss-vies-result {
    margin-top: 10px;
}

.oss-vies-status {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
}

.oss-vies-valid {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
}

.oss-vies-invalid {
    background: #fef2f2;
    border: 1px solid #ef9a9a;
    color: #c62828;
}

.oss-status-icon {
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}

.oss-status-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.oss-status-content strong {
    font-size: 14px;
}

.oss-vies-address {
    font-size: 12px;
    color: #546e56;
}

.oss-account-badge {
    display: inline-block;
    background: #2196F3;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    width: fit-content;
    margin-top: 4px;
}

.oss-pricing-info {
    font-size: 12px;
    font-style: italic;
    color: #388e3c;
}

/* ---- Responsive ---- */
@media (max-width: 576px) {
    .oss-vat-input-wrapper {
        flex-direction: column;
    }

    .oss-check-btn {
        width: 100%;
    }
}
