/**
 * Nomalie Feedback Widget Styling
 * Past bij de Nomalie design language
 */

/* ========================================
   Widget Container
   ======================================== */

.feedback-widget {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #46352D;
}

/* ========================================
   Toggle Button (zijkant)
   ======================================== */

.feedback-widget__toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(0);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: #46352D;
    color: #FAF8F5;
    border: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: -2px 2px 12px rgba(70, 53, 45, 0.15);
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.feedback-widget__toggle:hover {
    background: #A67C52;
    padding-right: 18px;
}

.feedback-widget__toggle-icon {
    display: flex;
    transform: rotate(90deg);
}

.feedback-widget__toggle-text {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Verberg toggle wanneer panel open is */
.feedback-widget--expanded .feedback-widget__toggle {
    opacity: 0;
    pointer-events: none;
}

/* ========================================
   Panel
   ======================================== */

.feedback-widget__panel {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(100%);
    width: 380px;
    max-height: 85vh;
    background: #FAF8F5;
    border: 1px solid rgba(70, 53, 45, 0.1);
    border-right: none;
    border-radius: 12px 0 0 12px;
    box-shadow: -4px 0 24px rgba(70, 53, 45, 0.12);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.feedback-widget--expanded .feedback-widget__panel {
    transform: translateY(-50%) translateX(0);
}

/* ========================================
   Header
   ======================================== */

.feedback-widget__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(70, 53, 45, 0.08);
    background: #fff;
}

.feedback-widget__title {
    font-family: 'Lora', serif;
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 4px 0;
    color: #46352D;
}

.feedback-widget__page {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #46352D;
    opacity: 0.6;
    margin: 0;
}

.feedback-widget__page-icon {
    font-size: 12px;
}

.feedback-widget__close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #46352D;
    opacity: 0.5;
    transition: opacity 0.2s;
    border-radius: 4px;
}

.feedback-widget__close:hover {
    opacity: 1;
    background: rgba(70, 53, 45, 0.05);
}

/* ========================================
   Intro Text
   ======================================== */

.feedback-widget__intro {
    font-size: 12px;
    color: #46352D;
    opacity: 0.7;
    padding: 12px 20px;
    margin: 0;
    background: rgba(166, 124, 82, 0.06);
    border-bottom: 1px solid rgba(70, 53, 45, 0.08);
    line-height: 1.5;
}

/* ========================================
   Tabs
   ======================================== */

.feedback-widget__tabs {
    display: flex;
    gap: 0;
    padding: 0 16px;
    background: #fff;
    border-bottom: 1px solid rgba(70, 53, 45, 0.08);
}

.feedback-widget__tab {
    flex: 1;
    padding: 12px 8px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #46352D;
    opacity: 0.5;
    cursor: pointer;
    transition: all 0.2s;
}

.feedback-widget__tab:hover {
    opacity: 0.8;
}

.feedback-widget__tab--active {
    opacity: 1;
    border-bottom-color: #A67C52;
    color: #A67C52;
}

/* ========================================
   Content Area
   ======================================== */

.feedback-widget__content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

/* Custom scrollbar */
.feedback-widget__content::-webkit-scrollbar {
    width: 6px;
}

.feedback-widget__content::-webkit-scrollbar-track {
    background: transparent;
}

.feedback-widget__content::-webkit-scrollbar-thumb {
    background: rgba(70, 53, 45, 0.15);
    border-radius: 3px;
}

.feedback-widget__content::-webkit-scrollbar-thumb:hover {
    background: rgba(70, 53, 45, 0.25);
}

/* ========================================
   Tab Content
   ======================================== */

.feedback-widget__tab-content {
    display: none;
}

.feedback-widget__tab-content--active {
    display: block;
}

/* ========================================
   Fields
   ======================================== */

.feedback-widget__field {
    margin-bottom: 16px;
}

.feedback-widget__field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #46352D;
    margin-bottom: 6px;
}

.feedback-widget__field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(70, 53, 45, 0.15);
    border-radius: 6px;
    background: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    color: #46352D;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.feedback-widget__field textarea::placeholder {
    color: #D9C4A8;
    font-style: italic;
}

.feedback-widget__field textarea:focus {
    outline: none;
    border-color: #A67C52;
    box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.1);
}

/* ========================================
   Info Text
   ======================================== */

.feedback-widget__info {
    font-size: 11px;
    color: #46352D;
    opacity: 0.7;
    background: rgba(166, 124, 82, 0.08);
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    line-height: 1.6;
    border-left: 3px solid #A67C52;
}

/* ========================================
   Radio Group
   ======================================== */

.feedback-widget__radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feedback-widget__radio {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid rgba(70, 53, 45, 0.15);
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.feedback-widget__radio:hover {
    border-color: #A67C52;
}

.feedback-widget__radio input[type="radio"] {
    width: 14px;
    height: 14px;
    accent-color: #A67C52;
}

.feedback-widget__radio:has(input:checked) {
    background: rgba(166, 124, 82, 0.1);
    border-color: #A67C52;
}

/* ========================================
   Star Rating
   ======================================== */

.feedback-widget__stars {
    display: flex;
    gap: 4px;
}

.feedback-widget__stars button {
    background: none;
    border: none;
    font-size: 24px;
    color: rgba(70, 53, 45, 0.2);
    cursor: pointer;
    padding: 2px;
    transition: all 0.15s;
    line-height: 1;
}

.feedback-widget__stars button:hover {
    transform: scale(1.1);
}

.feedback-widget__star--hover,
.feedback-widget__stars button:hover {
    color: rgba(166, 124, 82, 0.6);
}

.feedback-widget__star--active {
    color: #A67C52 !important;
}

/* ========================================
   General Section (altijd onderaan)
   ======================================== */

.feedback-widget__general {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed rgba(70, 53, 45, 0.15);
}

.feedback-widget__general label {
    color: #A67C52;
}

/* ========================================
   Footer
   ======================================== */

.feedback-widget__footer {
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid rgba(70, 53, 45, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feedback-widget__status {
    font-size: 11px;
    text-align: center;
    min-height: 16px;
}

.feedback-widget__status--success {
    color: #2e7d32;
}

.feedback-widget__status--error {
    color: #c62828;
}

.feedback-widget__status--info {
    color: #A67C52;
}

.feedback-widget__submit {
    width: 100%;
    padding: 14px 20px;
    background: #46352D;
    color: #FAF8F5;
    border: none;
    border-radius: 6px;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s;
}

.feedback-widget__submit:hover:not(:disabled) {
    background: #A67C52;
}

.feedback-widget__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   Mobile: Verberg widget volledig
   ======================================== */

@media (max-width: 768px) {
    .feedback-widget {
        display: none !important;
    }
}

/* ========================================
   Print: verberg widget
   ======================================== */

@media print {
    .feedback-widget {
        display: none !important;
    }
}
