/* Feedback Widget */
.feedback-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feedback-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(124, 58, 237, 0.55);
}

.feedback-fab svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

/* Modal overlay */
.feedback-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

/* Modal panel */
.feedback-modal {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 120px);
    background: rgba(30, 15, 60, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    z-index: 9999;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
}

.feedback-modal.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.feedback-modal__header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.feedback-modal__title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.feedback-modal__close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

.feedback-modal__close:hover {
    color: #fff;
}

.feedback-modal__body {
    padding: 16px 20px 20px;
}

/* Type selector pills */
.feedback-types {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.feedback-type-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.feedback-type-btn:hover {
    border-color: rgba(168, 85, 247, 0.5);
    color: #fff;
}

.feedback-type-btn.selected {
    background: rgba(168, 85, 247, 0.25);
    border-color: #a855f7;
    color: #fff;
}

/* Textarea */
.feedback-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.15s;
}

.feedback-textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.feedback-textarea:focus {
    outline: none;
    border-color: #a855f7;
}

/* Email input */
.feedback-email {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 13px;
    margin-top: 10px;
    font-family: inherit;
    transition: border-color 0.15s;
}

.feedback-email::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.feedback-email:focus {
    outline: none;
    border-color: #a855f7;
}

/* Submit button */
.feedback-submit {
    width: 100%;
    padding: 10px;
    margin-top: 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.feedback-submit:hover {
    opacity: 0.9;
}

.feedback-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Error text */
.feedback-error {
    color: #f87171;
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

.feedback-error.visible {
    display: block;
}

/* Success state */
.feedback-success {
    text-align: center;
    padding: 32px 20px;
}

.feedback-success__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.feedback-success__icon svg {
    width: 28px;
    height: 28px;
    fill: #22c55e;
}

.feedback-success__title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.feedback-success__text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

/* Character count */
.feedback-charcount {
    text-align: right;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 4px;
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .feedback-modal {
        right: 8px;
        bottom: 80px;
        width: calc(100vw - 16px);
    }

    .feedback-fab {
        bottom: 16px;
        right: 16px;
        width: 46px;
        height: 46px;
        font-size: 18px;
    }

    .feedback-fab svg {
        width: 18px;
        height: 18px;
    }
}
