/* ═══════════════════════════════════════════════════════════
   HRCS Feedback Widget — Styles
   ═══════════════════════════════════════════════════════════ */

/* ── FAB Button ── */
.feedback-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 107, 0, 0.4);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(255, 107, 0, 0.5);
}

.feedback-fab:active {
    transform: scale(0.96);
}

.feedback-fab i {
    font-size: 22px;
    line-height: 1;
}

/* ── Modal Backdrop ── */
.feedback-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.feedback-backdrop.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* ── Modal ── */
.feedback-modal {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: feedbackSlideUp 0.3s ease;
    position: relative;
}

@keyframes feedbackSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.feedback-modal-header {
    padding: 20px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.feedback-modal-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a1a1a;
}

.feedback-modal-header h5 i {
    color: #ff6b00;
}

.feedback-modal-header p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #777;
}

.feedback-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s;
    line-height: 1;
    height: auto !important;
}

.feedback-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.feedback-modal-body {
    padding: 16px 24px;
}

.feedback-modal-footer {
    padding: 12px 24px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ── Step: Capture ── */
.feedback-capture {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
    gap: 12px;
}

.feedback-capture i {
    font-size: 48px;
    color: #ff6b00;
    animation: feedbackPulse 1.5s ease-in-out infinite;
}

@keyframes feedbackPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

.feedback-capture p {
    color: #888;
    font-size: 14px;
}

/* ── Step: Annotate ── */
.feedback-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 10px;
    margin-bottom: 12px;
}

.feedback-toolbar .spacer {
    flex: 1;
}

.feedback-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    height: auto !important;
    line-height: 1.2 !important;
}

.feedback-tool-btn:hover {
    border-color: #bbb;
    background: #fafafa;
}

.feedback-tool-btn.active {
    background: #ff6b00;
    color: #fff;
    border-color: #ff6b00;
}

.feedback-tool-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.feedback-canvas-wrapper {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #f9f9f9;
}

.feedback-canvas-wrapper canvas {
    display: block;
    width: 100%;
    cursor: crosshair;
}

/* ── Step: Form ── */
.feedback-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.feedback-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s;
    height: auto !important;
    line-height: 1 !important;
}

.feedback-type-btn i {
    font-size: 20px;
}

.feedback-type-btn span {
    font-size: 12px;
    font-weight: 500;
}

/* Bug */
.feedback-type-btn[data-type="bug"] {
    color: #dc3545;
    border-color: #f8d7da;
    background: #fff5f5;
}
.feedback-type-btn[data-type="bug"].active {
    border-color: #dc3545;
    background: #fce8ea;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

/* Suggestion */
.feedback-type-btn[data-type="suggestion"] {
    color: #e67e22;
    border-color: #fde8d0;
    background: #fffbf5;
}
.feedback-type-btn[data-type="suggestion"].active {
    border-color: #e67e22;
    background: #fef3e2;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15);
}

/* Question */
.feedback-type-btn[data-type="question"] {
    color: #2196f3;
    border-color: #d0e8fd;
    background: #f5faff;
}
.feedback-type-btn[data-type="question"].active {
    border-color: #2196f3;
    background: #e3f2fd;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.15);
}

.feedback-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.feedback-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.15s;
    background: #fff !important;
    color: #333 !important;
}

.feedback-textarea:focus {
    outline: none;
    border-color: #ff6b00;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.feedback-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s;
    background: #fff !important;
    color: #333 !important;
}

.feedback-input:focus {
    outline: none;
    border-color: #ff6b00;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.feedback-screenshot-preview {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #f9f9f9;
    margin-top: 8px;
}

.feedback-screenshot-preview img {
    display: block;
    width: 100%;
    max-height: 160px;
    object-fit: contain;
}

/* ── Buttons ── */
.feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    height: auto !important;
    line-height: 1.4 !important;
}

.feedback-btn-outline {
    background: #fff;
    color: #555;
}

.feedback-btn-outline:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.feedback-btn-primary {
    background: linear-gradient(135deg, #ff8c00, #ff6b00) !important;
    color: #fff !important;
    border: none !important;
}

.feedback-btn-primary:hover {
    background: linear-gradient(135deg, #ff9500, #e06000) !important;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
}

.feedback-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* ── Success ── */
.feedback-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
    gap: 8px;
}

.feedback-success i {
    font-size: 56px;
    color: #22c55e;
}

.feedback-success .title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.feedback-success .subtitle {
    font-size: 14px;
    color: #888;
}

/* ── Spinner ── */
.feedback-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: feedbackSpin 0.6s linear infinite;
}

@keyframes feedbackSpin {
    to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 576px) {
    .feedback-modal {
        width: 95%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .feedback-type-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .feedback-type-btn {
        padding: 10px 4px;
    }

    .feedback-fab {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }
}
