/**
 * Feedback Widget - Styles
 */

/* Honeypot field - completely hidden */
.feedback-widget__hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Widget container */
.feedback-widget {
    margin: 1.5rem 0;
}

.feedback-widget__header {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.feedback-widget__title {
    margin: 0;
    white-space: nowrap;
}

.feedback-widget__title-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.feedback-widget__title-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.feedback-widget__toggle {
    cursor: pointer;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    list-style: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.25);
}

.feedback-widget__toggle::-webkit-details-marker {
    display: none;
}

.feedback-widget__toggle:hover {
    background: linear-gradient(135deg, #2980b9, #1a5276);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.35);
}

.feedback-widget[open] .feedback-widget__toggle {
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

/* Form container */
.feedback-widget__form {
    background: #f8f9fa;
    border: 1px solid #e1e5eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 1.5rem;
    animation: feedbackSlideDown 0.3s ease;
}

@keyframes feedbackSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fields */
.feedback-widget__field {
    margin-bottom: 1rem;
}

.feedback-widget__field label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: #2c3e50;
    font-size: 0.9rem;
}

.feedback-widget__field label .required {
    color: #e74c3c;
}

.feedback-widget__field input,
.feedback-widget__field textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid #ccd5df;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.feedback-widget__field input:focus,
.feedback-widget__field textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.feedback-widget__field input::placeholder,
.feedback-widget__field textarea::placeholder {
    color: #95a5a6;
}

.feedback-widget__field textarea {
    resize: vertical;
    min-height: 100px;
}

/* Submit button */
.feedback-widget__actions {
    margin-top: 1.25rem;
}

.feedback-widget__submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.25);
}

.feedback-widget__submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #219a52, #1a7840);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.35);
}

.feedback-widget__submit:active:not(:disabled) {
    transform: translateY(0);
}

.feedback-widget__submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading spinner */
.feedback-widget__submit .spinner {
    animation: feedbackSpin 1s linear infinite;
}

@keyframes feedbackSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Response messages */
.feedback-widget__response {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    animation: feedbackFadeIn 0.3s ease;
}

@keyframes feedbackFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.feedback-widget__response.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback-widget__response.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Bootstrap 5.3 Dark Theme Support */
[data-bs-theme="dark"] .feedback-widget__form {
    background: #151c26;
    border-color: #213a5b;
}

[data-bs-theme="dark"] .feedback-widget__field label {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .feedback-widget__field input,
[data-bs-theme="dark"] .feedback-widget__field textarea {
    background: #151c26;
    border-color: #213a5b;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .feedback-widget__field input:focus,
[data-bs-theme="dark"] .feedback-widget__field textarea:focus {
    border-color: #8bb8e8;
    box-shadow: 0 0 0 3px rgba(139, 184, 232, 0.25);
}

[data-bs-theme="dark"] .feedback-widget__field input::placeholder,
[data-bs-theme="dark"] .feedback-widget__field textarea::placeholder {
    color: #6c757d;
}

[data-bs-theme="dark"] .feedback-widget__response.success {
    background: #1a3a2a;
    color: #7dcea0;
    border-color: #2d5a3d;
}

[data-bs-theme="dark"] .feedback-widget__response.error {
    background: #3a1a1e;
    color: #f1948a;
    border-color: #5a2d32;
}

/* Bootstrap 5.3 Light Theme Support */
[data-bs-theme="light"] .feedback-widget__submit {
    background: linear-gradient(135deg, #399deb 0%, #347ce9 100%);
    box-shadow: 0 2px 8px rgba(57, 157, 235, 0.25);
}

[data-bs-theme="light"] .feedback-widget__submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #2b8ad8 0%, #2868d6 100%);
    box-shadow: 0 4px 12px rgba(57, 157, 235, 0.35);
}

/* Responsive */
@media (max-width: 480px) {
    .feedback-widget__form {
        padding: 1rem;
    }

    .feedback-widget__submit {
        width: 100%;
        justify-content: center;
    }
}
