/* --- OVERLAY --- */
.feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.feedback-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* --- DRAWER --- */
.feedback-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 540px;
    border-top-right-radius: 24px;
    border-bottom-right-radius: 24px;
    background-color: white;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 32px 24px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.feedback-drawer.is-open {
    transform: translateX(0);
}

/* --- HEADER --- */
.feedback-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.feedback-drawer-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #132D2F;
    line-height: 1.4;
    margin: 0;
    max-width: 85%;
}

#btn-close-feedback.btn-icon-only {
    background: #FFFFFF;
    border: 1px solid #D9EEF3;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* --- FORM --- */
.form-section {
    margin-bottom: 16px;
}

.form-section-tell {
    margin-bottom: 8px;
}

.section-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #132D2F;
    margin-bottom: 10px;
}

/* --- STARS --- */
.rating-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 30px;
}

.star-rating-container {
    display: flex;
    gap: 8px;
    cursor: pointer;
}

.rating-text {
    font-size: 14px;
    font-weight: 600;
    color: #132D2F;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    white-space: nowrap;
}

.rating-text.is-visible {
    opacity: 1;
}

.star-icon {
    transition: transform 0.2s ease;
}

.star-icon:hover {
    transform: scale(1.2);
}

.star-icon.filled path {
    fill: #F27123;
}

/* --- TAGS --- */
.tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feedback-tag {
    background-color: #F3F4F6;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: #132D2F;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-tag.active {
    background-color: #FAC6A7;
    border-color: #FAC6A7;
    color: #132D2F;
}

/* --- INPUTS --- */
.feedback-textarea,
.feedback-input {
    width: 100%;
    padding: 12px !important;
    border: 1px solid #FCE3D3 !important;
    border-radius: 16px !important;
    font-family: inherit;
    font-size: 13px !important;
    color: #132D2F;
    outline: none;
    transition: border-color 0.2s ease;
}

.feedback-textarea {
    min-height: 100px;
    resize: vertical;
}

.feedback-textarea:focus,
.feedback-input:focus {
    border-color: #FD8559;
}

/* --- BUTTONS --- */
.btn-attachment {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 5px;
    border: 1px solid #D9EEF3;
    border-radius: 10px;
    background: white;
    font-size: 14px;
    color: #6B7280;
    cursor: pointer;
}

.btn-attachment span {
    font-size: 16px;
}

.btn-submit-feedback {
    width: 100%;
    padding: 12px;
    background-color: #FD8559;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#mobile-drawer-handle {
    display: none;
}

/* =========================
   MOBILE BOTTOM SHEET
   ========================= */
@media (max-width: 600px) {
    .feedback-drawer {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        max-height: 87vh;
        border-radius: 24px 24px 0 0;
        overflow-y: auto;
        padding-top: 0;
        transform: translateY(100%);
    }

    .feedback-drawer.is-open {
        transform: translateY(0);
    }

    #mobile-drawer-handle {
        position: sticky;
        top: 0;
        width: 100%;
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: white;
        z-index: 10;
        margin-bottom: 10px;
        cursor: pointer;
    }

    /* The Gray Pill */
    #mobile-drawer-handle span {
        display: block;
        width: 48px;
        height: 5px;
        background-color: #E5E7EB;
        border-radius: 100px;
    }

    .feedback-drawer-header h2 {
        font-size: 18px;
        max-width: 100%;
    }

    .feedback-drawer-header .btn-icon-only {
        display: none !important;
    }

}