.bif-bookitfast-certificate-form {
    margin: 0 auto;
    /* Background is set per-layout (.bif-gc-layout-*) so it stays overridable. */
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

.bif-form-header {
    background: linear-gradient(135deg, var(--bif-button-color, #2563eb) 0%, var(--bif-button-color-alpha, #2563ebdd) 100%);
    color: white;
    padding: 32px;
    text-align: center;
}

.bif-form-header h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.025em;
}

.bif-form-content {
    padding: 32px;
}

.bif-alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 500;
}

.bif-alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.bif-alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.bif-section {
    margin-bottom: 40px;
}

.bif-section:last-child {
    margin-bottom: 0;
}

.bif-section h4 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.bif-form-group {
    margin-bottom: 20px;
}

.bif-form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    font-size: 14px;
}

.bif-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    color: #1f2937;
    background: white;
    transition: all 0.2s ease;
}

.bif-form-control:focus {
    outline: none;
    border-color: var(--bif-button-color, #2563eb);
    box-shadow: 0 0 0 3px var(--bif-button-color-focus, #2563eb1a);
}

.bif-form-control:hover {
    border-color: #d1d5db;
}

select.bif-form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

.bif-form-row {
    display: flex;
    flex-direction: column;
}

.bif-user-details-form {
    padding: 0;
}

.bif-payment-container {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    margin-top: 32px;
    border: 1px solid #e2e8f0;
    animation: fadeIn 0.3s ease;
}

.bif-payment-container h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
}

.bif-amount-summary {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
}

.bif-amount-summary p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.bif-amount-summary p:last-child {
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    font-weight: 600;
    color: #1f2937;
}

.bif-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
}

.bif-btn-primary {
    background: linear-gradient(135deg, var(--bif-button-color, #2563eb) 0%, var(--bif-button-color-alpha, #2563ebdd) 100%);
    color: white;
    box-shadow: 0 4px 6px -1px var(--bif-button-color-shadow, #2563eb4d);
}

.bif-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--bif-button-color-alpha, #2563ebdd) 0%, var(--bif-button-color, #2563eb) 100%);
    box-shadow: 0 8px 12px -1px var(--bif-button-color-shadow-hover, #2563eb66);
    transform: translateY(-1px);
}

.bif-btn-primary:active {
    transform: translateY(0);
}

.bif-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.bif-btn-rounded {
    border-radius: 24px;
}

.bif-stripe-payment-button {
    width: 100%;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    font-weight: 600;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.3);
}

.bif-stripe-payment-button:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    box-shadow: 0 8px 12px -1px rgba(5, 150, 105, 0.4);
    transform: translateY(-1px);
}

.bif-stripe-payment-button:active {
    transform: translateY(0);
}

.bif-button-container {
    text-align: center;
    margin-top: 32px;
}

.StripeElement {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    transition: border-color 0.2s ease;
}

.StripeElement--focus {
    border-color: var(--bif-button-color, #2563eb);
    box-shadow: 0 0 0 3px var(--bif-button-color-focus, #2563eb1a);
}

.StripeElement--invalid {
    border-color: #dc2626;
}

.StripeElement iframe {
    height: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .bif-form-header {
        padding: 24px;
    }

    .bif-form-header h3 {
        font-size: 24px;
    }

    .bif-form-content {
        padding: 24px;
    }

    .bif-payment-container {
        padding: 20px;
        margin-top: 24px;
    }
}

@media (max-width: 480px) {
    .bif-form-header {
        padding: 20px;
    }

    .bif-form-content {
        padding: 20px;
    }

    .bif-section {
        margin-bottom: 32px;
    }
}

/* Terms Checkbox & Privacy Consent */
.bif-terms-checkbox,
.bif-privacy-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.5rem;
    background: #f7fafc;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.bif-terms-checkbox input[type="checkbox"],
.bif-privacy-consent input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 1.125rem;
    height: 1.125rem;
    margin-right: 0.75rem;
    accent-color: #3b82f6;
}

.bif-terms-checkbox label,
.bif-privacy-consent label {
    color: #4a5568;
    line-height: 1.6;
    cursor: pointer;
}

.bif-terms-checkbox a,
.bif-privacy-consent a {
    color: #4299e1;
    text-decoration: none;
    font-weight: 600;
}

.bif-terms-checkbox a:hover,
.bif-privacy-consent a:hover {
    text-decoration: underline;
}