/* BBV Feedback – Frontend Styles (theme-neutral) */

/* ---- Container ---- */
.bbv-fb-wrap {
    max-width: 640px;
    margin: 0 auto;
}

/* ---- Form Layout ---- */
.bbv-fb-form .bbv-fb-form__row {
    margin-bottom: 20px;
}

.bbv-fb-form .bbv-fb-form__row--submit {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}

/* ---- Form Fields ---- */
.bbv-fb-form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bbv-fb-form__field > label,
.bbv-fb-form__field > legend {
    font-weight: 600;
    font-size: 0.9em;
    color: #333;
    line-height: 1.4;
}

.bbv-fb-form__field fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.bbv-fb-form input[type="text"],
.bbv-fb-form input[type="email"],
.bbv-fb-form input[type="date"],
.bbv-fb-form textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s;
}

.bbv-fb-form input[type="date"] {
    max-width: 200px;
}

.bbv-fb-form input:focus,
.bbv-fb-form textarea:focus {
    border-color: #3b5ba5;
    outline: 2px solid rgba(59, 91, 165, .25);
    outline-offset: 0;
}

/* ---- Radio buttons (vertical, for role/course_type) ---- */
.bbv-fb-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95em;
    color: #333;
    padding: 3px 0;
}

.bbv-fb-radio input[type="radio"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #3b5ba5;
}

/* ---- Rating groups (horizontal on desktop) ---- */
.bbv-fb-rating-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 4px;
}

.bbv-fb-rating-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.9em;
    color: #333;
    padding: 6px 14px;
    border: 1px solid #ccc;
    border-radius: 20px;
    background: #fff;
    transition: border-color .15s, background .15s;
    user-select: none;
}

.bbv-fb-rating-option:hover {
    border-color: #3b5ba5;
    background: #f0f4ff;
}

.bbv-fb-rating-option input[type="radio"] {
    /* visually hidden but still functional */
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.bbv-fb-rating-option:has(input[type="radio"]:checked) {
    border-color: #3b5ba5;
    background: #3b5ba5;
    color: #fff;
    font-weight: 600;
}

@media (max-width: 520px) {
    .bbv-fb-rating-group {
        flex-direction: column;
    }

    .bbv-fb-rating-option {
        justify-content: center;
    }
}

/* ---- Required / Optional markers ---- */
.bbv-fb-required {
    color: #c0392b;
    margin-left: 2px;
}

.bbv-fb-optional {
    font-weight: 400;
    color: #777;
    font-size: 0.85em;
    margin-left: 4px;
}

.bbv-fb-required-note {
    font-size: 0.82em;
    color: #777;
    margin: 8px 0 0;
}

/* ---- Divider ---- */
.bbv-fb-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 24px 0;
}

/* ---- Button ---- */
.bbv-fb-btn {
    display: inline-block;
    padding: 11px 28px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    cursor: pointer;
    font-weight: 600;
    transition: background .15s, opacity .15s;
}

.bbv-fb-btn--primary {
    background: #3b5ba5;
    color: #fff;
}

.bbv-fb-btn--primary:hover {
    background: #2d4a8e;
}

.bbv-fb-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ---- Spinner ---- */
.bbv-fb-spinner[hidden] {
    display: none !important;
}

.bbv-fb-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(59, 91, 165, .3);
    border-top-color: #3b5ba5;
    border-radius: 50%;
    animation: bbv-fb-spin .7s linear infinite;
    flex-shrink: 0;
}

@keyframes bbv-fb-spin {
    to { transform: rotate(360deg); }
}

/* ---- Messages ---- */
.bbv-fb-form__messages {
    margin-bottom: 12px;
}

.bbv-fb-form__messages p {
    margin: 0;
    padding: 11px 14px;
    border-radius: 4px;
    font-size: 0.95em;
    line-height: 1.5;
}

.bbv-fb-msg--error {
    background: #fde8e8;
    color: #c0392b;
    border: 1px solid #f5c6c6;
}

.bbv-fb-msg--success {
    background: #eafaf1;
    color: #1e7e34;
    border: 1px solid #b7dfc7;
}

/* ---- Success Banner (shown after submit) ---- */
.bbv-fb-success {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #eafaf1;
    border: 1px solid #b7dfc7;
    border-radius: 6px;
    padding: 22px 26px;
    color: #155724;
}

.bbv-fb-success__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    color: #28a745;
}

.bbv-fb-success__message {
    margin: 0;
    font-size: 1.05em;
    font-weight: 500;
}
