:root {
    --bb-form-border: #e5e7eb;
    --bb-form-text: #1f2937;
    --bb-form-muted: #6b7280;
    --bb-form-error: #dc2626;
    --bb-form-success: #047857;
    --bb-form-bg: #ffffff;
    --bb-form-accent: #2563eb;
}

.bb-application-form-wrapper {
    width: 100%;
    margin: 0 auto;
}

[data-bb-application-form] {
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--bb-form-text);
}

.bb-application-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    max-width: none;
    margin: 0;
}

.bb-application-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.bb-application-header img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--bb-form-border);
}

.bb-application-header .bb-application-heading {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.bb-application-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.bb-application-header p {
    margin: 0;
    color: var(--bb-form-muted);
    font-size: 0.95rem;
}

.bb-application-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 3rem 0;
    font-size: 0.95rem;
    color: var(--bb-form-muted);
}

.bb-application-loading::before {
    content: "";
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    border: 3px solid var(--bb-form-border);
    border-top-color: var(--bb-form-accent);
    animation: bb-spin 0.8s linear infinite;
}

@keyframes bb-spin {
    to {
        transform: rotate(360deg);
    }
}

.bb-form-field {
    margin-bottom: 1.5rem;
}

.bb-form-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

.bb-form-label span {
    color: var(--bb-form-error);
}

.bb-form-input,
.bb-form-textarea,
.bb-form-select {
    width: 100%;
    border: 1px solid var(--bb-form-border);
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background: #ffffff;
}

.bb-form-textarea {
    min-height: 120px;
    resize: vertical;
}

.bb-form-input:focus,
.bb-form-textarea:focus,
.bb-form-select:focus {
    outline: none;
    border-color: var(--bb-form-accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
    background: #ffffff;
}

.bb-checkbox-group,
.bb-multichoice-group {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.bb-checkbox-option,
.bb-multichoice-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    color: var(--bb-form-text);
}

.bb-checkbox-option input,
.bb-multichoice-option input {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.bb-form-help {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--bb-form-muted);
}

.bb-form-error {
    margin-top: 0.45rem;
    font-size: 0.85rem;
    color: var(--bb-form-error);
}

.bb-form-field.bb-has-error .bb-form-input,
.bb-form-field.bb-has-error .bb-form-textarea,
.bb-form-field.bb-has-error .bb-form-select {
    border-color: var(--bb-form-error);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.bb-form-submit {
    width: auto;
    min-width: 180px;
    border: 0;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--bb-form-accent);
    color: #ffffff;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.bb-form-submit:hover {
    background: rgba(37, 99, 235, 0.9);
    transform: translateY(-1px);
}

.bb-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.bb-form-success,
.bb-form-error-summary {
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.bb-form-success {
    background: rgba(4, 120, 87, 0.12);
    color: var(--bb-form-success);
    border: 1px solid rgba(4, 120, 87, 0.3);
}

.bb-form-error-summary {
    background: rgba(220, 38, 38, 0.1);
    color: var(--bb-form-error);
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.bb-application-footer {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--bb-form-muted);
}

.bb-application-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.bb-application-footer a span {
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.bb-application-footer a:hover span {
    border-color: currentColor;
}

.bb-application-footer img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

@media (max-width: 768px) {
    .bb-application-card {
        padding: 2rem 1.5rem;
    }
}