/* Feedback Widget - Sticky Button */
.feedback-widget {
    position: fixed !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 1050 !important;
    pointer-events: auto !important;
}

/* Sticky Trigger Button */
.feedback-trigger {
    position: fixed !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) translateX(0) !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px 0 0 8px !important;
    padding: 16px 12px !important;
    cursor: pointer !important;
    box-shadow: -2px 2px 12px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    writing-mode: vertical-rl !important;
    text-orientation: mixed !important;
    z-index: 1051 !important;
}

.feedback-trigger:hover {
    transform: translateY(-50%) translateX(-5px);
    box-shadow: -4px 4px 16px rgba(102, 126, 234, 0.6);
}

.feedback-trigger.active {
    transform: translateY(-50%) translateX(-350px);
    border-radius: 8px 0 0 8px;
}

.feedback-trigger i {
    font-size: 20px;
}

.feedback-trigger span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 14px;
}

/* Feedback Panel - Slide-out */
.feedback-panel {
    position: fixed;
    right: -400px;
    top: 50%;
    transform: translateY(-50%);
    width: 380px;
    max-height: 90vh;
    background: white;
    border-radius: 12px 0 0 12px;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1052;
}

.feedback-panel.open {
    right: 0;
}

/* Feedback Header */
.feedback-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.feedback-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.feedback-header .close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.feedback-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Feedback Body */
.feedback-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
}

.feedback-intro {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.feedback-body .form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.feedback-body .form-control,
.feedback-body .form-select {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.feedback-body .form-control:focus,
.feedback-body .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.feedback-body textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.feedback-actions {
    margin-top: 20px;
}

.feedback-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feedback-actions .btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.feedback-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.feedback-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.feedback-info small {
    display: flex;
    align-items: start;
    gap: 8px;
    line-height: 1.5;
}

.feedback-info i {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Success State */
.feedback-success {
    padding: 40px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.feedback-success i {
    font-size: 64px;
    color: #10b981;
    margin-bottom: 20px;
}

.feedback-success h4 {
    color: #1f2937;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feedback-success p {
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Overlay */
.feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1049;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Alert Styles */
.alert-sm {
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 6px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .feedback-panel {
        width: 100%;
        max-width: 400px;
        right: -100%;
        border-radius: 12px 0 0 12px;
    }

    .feedback-trigger.active {
        transform: translateY(-50%) translateX(-100%);
    }

    .feedback-body {
        padding: 20px;
    }

    .feedback-header {
        padding: 16px;
    }

    .feedback-header h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .feedback-panel {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        top: 0;
        transform: none;
        border-radius: 0;
    }

    .feedback-trigger {
        right: 10px;
    }

    .feedback-trigger.active {
        display: none;
    }

    .feedback-success {
        min-height: auto;
        padding: 60px 24px;
    }
}

/* Print - Hide feedback widget */
@media print {
    .feedback-widget {
        display: none !important;
    }
}
