/**
 * Suggestion Widget - Floating Button & Modal
 * Notion-inspired design for product feedback
 */

/* ============================================
   FLOATING SUGGESTION BUTTON
   ============================================ */

.suggestion-fab {
    position: fixed;
    bottom: 80px; /* Above sync indicator */
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #2B4C7E 0%, #3B5998 100%);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(43, 76, 126, 0.3),
                0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    border: none;
    opacity: 0.9;
}

.suggestion-fab:hover {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(43, 76, 126, 0.4),
                0 3px 10px rgba(0, 0, 0, 0.2);
}

.suggestion-fab:active {
    transform: scale(0.95);
}

.suggestion-fab-icon {
    font-size: 28px;
    line-height: 1;
}

/* Tooltip on hover */
.suggestion-fab::before {
    content: '💡 Suggérer une amélioration';
    position: absolute;
    right: 70px;
    background: #1F2937;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.suggestion-fab:hover::before {
    opacity: 1;
}

/* ============================================
   SUGGESTION MODAL
   ============================================ */

.suggestion-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.suggestion-modal.active {
    display: flex;
}

.suggestion-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.suggestion-modal-header {
    padding: 24px 24px 20px 24px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.suggestion-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestion-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #9CA3AF;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.suggestion-modal-close:hover {
    background: #F3F4F6;
    color: #374151;
}

/* Modal Body */
.suggestion-modal-body {
    padding: 24px;
}

.suggestion-intro {
    color: #6B7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.suggestion-form-group {
    margin-bottom: 20px;
}

.suggestion-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
}

.suggestion-textarea {
    width: 100%;
    min-height: 140px;
    padding: 12px 14px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.suggestion-textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(43, 76, 126, 0.1);
}

.suggestion-textarea::placeholder {
    color: #9CA3AF;
}

.suggestion-char-count {
    font-size: 12px;
    color: #9CA3AF;
    text-align: right;
    margin-top: 6px;
}

.suggestion-email-group {
    margin-bottom: 20px;
}

.suggestion-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.suggestion-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(43, 76, 126, 0.1);
}

.suggestion-hint {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 6px;
}

/* Modal Footer */
.suggestion-modal-footer {
    padding: 16px 24px;
    background: #F9FAFB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.suggestion-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.suggestion-btn-cancel {
    background: white;
    color: #6B7280;
    border: 1px solid #D1D5DB;
}

.suggestion-btn-cancel:hover {
    background: #F9FAFB;
    color: #374151;
}

.suggestion-btn-submit {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-500) 100%);
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.suggestion-btn-submit:hover {
    box-shadow: 0 4px 12px rgba(43, 76, 126, 0.3);
    transform: translateY(-1px);
}

.suggestion-btn-submit:active {
    transform: translateY(0);
}

.suggestion-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Success State */
.suggestion-success {
    display: none;
    text-align: center;
    padding: 40px 24px;
}

.suggestion-success.active {
    display: block;
}

.suggestion-success-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.suggestion-success-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.suggestion-success-message {
    font-size: 15px;
    color: #6B7280;
    line-height: 1.6;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .suggestion-fab {
        bottom: 70px;
        right: 16px;
        width: 48px;
        height: 48px;
    }

    .suggestion-fab::before {
        display: none;
    }

    .suggestion-modal-content {
        max-width: 100%;
        border-radius: 12px;
    }
}
