/**
 * Site Feedback Plugin Styles
 */

/* Feedback Button - Floating circular button */
.site-feedback-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 998; /* Below mobile filter button (z-index: 999) but above content */
    padding: 0;
}

.site-feedback-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.site-feedback-btn:active {
    transform: scale(0.95);
}

.site-feedback-btn svg {
    width: 28px;
    height: 28px;
    color: white;
}

/* Adjust position on mobile to be above the filter button */
@media (max-width: 768px) {
    .site-feedback-btn {
        bottom: 60px; /* Above mobile filter buttons which are at bottom: 20px with height ~50px */
        right: 20px;
        width: 56px;
        height: 56px;
    }

    .site-feedback-btn svg {
        width: 24px;
        height: 24px;
    }
}

/* Modal Overlay */
.site-feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: none;
}

.site-feedback-modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.site-feedback-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease;
}

/* Modal Container */
.site-feedback-container {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    z-index: 1;
}

/* Modal Header */
.site-feedback-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #ddd;
    background: #2271b1;
}

.site-feedback-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.site-feedback-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.site-feedback-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Modal Content */
.site-feedback-content {
    padding: 24px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

/* Form Fields - Match site's existing form styling */
.site-feedback-field {
    margin-bottom: 20px;
}

.site-feedback-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.site-feedback-field .optional {
    font-weight: 400;
    color: #666;
    font-size: 13px;
}

.site-feedback-field .required {
    color: #d63638;
}

.site-feedback-field input,
.site-feedback-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    min-height: 44px;
}

.site-feedback-field input:focus,
.site-feedback-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.site-feedback-field textarea {
    resize: vertical;
    min-height: 120px;
}

/* Form Actions - Match site's existing button styling */
.site-feedback-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.site-feedback-submit,
.site-feedback-cancel {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.site-feedback-submit {
    background: #2271b1;
    color: white;
}

.site-feedback-submit:hover {
    background: #135e96;
}

.site-feedback-submit:disabled {
    background: #6c9bc4;
    cursor: not-allowed;
    opacity: 0.7;
}

.site-feedback-cancel {
    background: #ddd;
    color: #333;
}

.site-feedback-cancel:hover {
    background: #ccc;
}

/* Success/Error Messages */
.site-feedback-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
}

.site-feedback-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.site-feedback-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .site-feedback-container {
        width: 95%;
        max-height: 85vh;
    }

    .site-feedback-header {
        padding: 16px 20px;
    }

    .site-feedback-header h3 {
        font-size: 18px;
    }

    .site-feedback-content {
        padding: 20px;
    }

    .site-feedback-actions {
        flex-direction: column;
    }

    .site-feedback-submit,
    .site-feedback-cancel {
        width: 100%;
    }
}
