/* ============================================================================
   PAGE FEEDBACK POPUP STYLES
   Professional, clean design aligned with Unzer brand identity
   ============================================================================ */

/* Overlay backdrop */
.feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 100001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feedback-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main popup container - Always light mode */
.feedback-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    display: flex;
    flex-direction: column;
    background: #ffffff !important;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(252, 17, 84, 0.08);
    z-index: 100002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0c1332 !important;
}

.feedback-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Popup header with gradient accent - Unzer Raspberry */
.feedback-popup-header {
    position: relative;
    padding: 24px 28px 20px;
    background: linear-gradient(135deg, #fc1154 0%, #e00f4b 100%);
    color: #ffffff;
    flex-shrink: 0;
}

.feedback-popup-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b8a, #ffb3c1);
}

.feedback-popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.feedback-popup-header .header-icon {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-popup-header .header-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Close button */
.feedback-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #ffffff;
}

.feedback-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.feedback-close-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Popup body */
.feedback-popup-body {
    padding: 24px 28px;
    background: #ffffff !important;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* Step content */
.feedback-step {
    display: none;
}

.feedback-step.active {
    display: block;
    animation: fadeInStep 0.3s ease-out;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Step title */
.feedback-step-title {
    margin: 0 0 20px 0;
    font-size: 15px;
    font-weight: 500;
    color: #0c1332;
    line-height: 1.5;
}

/* Radio options container */
.feedback-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Custom radio buttons */
.feedback-option {
    position: relative;
    display: flex !important;
    align-items: flex-start;
    padding: 14px 16px;
    background: #f8f9fb !important;
    border: 2px solid #e6e7ea !important;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-option:hover {
    border-color: #ffb3c1 !important;
    background: #fff5f7 !important;
}

.feedback-option.selected {
    border-color: #fc1154 !important;
    background: linear-gradient(135deg, #fff5f7 0%, #ffe8ed 100%) !important;
    box-shadow: 0 2px 8px rgba(252, 17, 84, 0.12);
}

.feedback-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.feedback-option-radio {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #c4c5cc;
    border-radius: 50%;
    margin-right: 14px;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: #ffffff;
}

.feedback-option.selected .feedback-option-radio {
    border-color: #fc1154;
    background: #fc1154;
}

.feedback-option-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.feedback-option.selected .feedback-option-radio::after {
    opacity: 1;
    transform: scale(1);
}

.feedback-option-content {
    flex: 1;
}

.feedback-option-label {
    font-size: 14px;
    font-weight: 500;
    color: #0c1332;
    line-height: 1.4;
    margin-bottom: 2px;
}

.feedback-option-desc {
    font-size: 13px;
    color: #6d7184;
    line-height: 1.4;
}

/* Textarea for additional comments */
.feedback-textarea-wrapper {
    margin-bottom: 8px;
    display: block !important;
}

.feedback-textarea-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #0c1332 !important;
    margin-bottom: 12px;
}

.feedback-textarea {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    min-height: 140px !important;
    max-height: 300px;
    padding: 14px 16px !important;
    margin-bottom: 10px !important;
    border: 2px solid #dbdce0 !important;
    border-radius: 12px !important;
    font-family: inherit;
    font-size: 14px !important;
    color: #0c1332 !important;
    background-color: #f8f9fb !important;
    resize: vertical;
    transition: all 0.2s ease;
    line-height: 1.6;
    box-sizing: border-box !important;
}

.feedback-textarea:focus {
    outline: none !important;
    border-color: #fc1154 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(252, 17, 84, 0.1) !important;
}

.feedback-textarea::placeholder {
    color: #9295a3 !important;
}

.feedback-optional-hint {
    display: block !important;
    font-size: 12px;
    color: #9295a3 !important;
    font-style: italic;
    margin-top: 6px;
}

/* Popup footer with buttons */
.feedback-popup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px;
    background: #f8f9fb !important;
    border-top: 1px solid #e6e7ea !important;
    flex-shrink: 0;
}

/* Button styles */
.feedback-btn {
    padding: 12px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.feedback-btn-secondary {
    background: #ffffff;
    color: #6d7184;
    border: 2px solid #e6e7ea;
}

.feedback-btn-secondary:hover {
    background: #f1f1f3;
    border-color: #dbdce0;
    color: #0c1332;
}

.feedback-btn-primary {
    background: linear-gradient(135deg, #fc1154 0%, #e00f4b 100%);
    color: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(252, 17, 84, 0.3);
}

.feedback-btn-primary:hover {
    background: linear-gradient(135deg, #e00f4b 0%, #c90d42 100%);
    box-shadow: 0 4px 12px rgba(252, 17, 84, 0.4);
    transform: translateY(-1px);
}

.feedback-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(252, 17, 84, 0.3);
}

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

/* Success state */
.feedback-success {
    text-align: center;
    padding: 20px 0;
}

.feedback-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #00a862 0%, #00c974 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPulse 0.5s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.feedback-success-icon svg {
    width: 36px;
    height: 36px;
    stroke: #ffffff;
    stroke-width: 3;
    fill: none;
}

.feedback-success h4 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #0c1332;
}

.feedback-success p {
    margin: 0;
    font-size: 14px;
    color: #6d7184;
    line-height: 1.5;
}

/* Loading state */
.feedback-btn.loading {
    pointer-events: none;
    position: relative;
    color: transparent;
}

.feedback-btn.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: btnSpin 0.7s linear infinite;
}

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

/* Error state */
.feedback-error {
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #b80000;
    font-size: 13px;
    display: none;
}

.feedback-error.visible {
    display: block;
    animation: shakeError 0.4s ease;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Progress indicator */
.feedback-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0 28px 20px;
    flex-shrink: 0;
}

.feedback-progress-step {
    width: 40px;
    height: 4px;
    background: #ffd6de;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.feedback-progress-step.active {
    background: #fc1154;
}

.feedback-progress-step.completed {
    background: #e00f4b;
}

/* Responsive adjustments for smaller widths */
@media (max-width: 540px) {
    .feedback-popup {
        max-width: calc(100% - 32px);
        margin: 16px;
    }
    
    .feedback-popup-header {
        padding: 20px 20px 16px;
    }
    
    .feedback-close-btn {
        top: 14px;
        right: 14px;
        width: 30px;
        height: 30px;
    }
    
    .feedback-close-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .feedback-popup-body {
        padding: 20px;
    }
    
    .feedback-popup-footer {
        padding: 16px 20px;
        flex-direction: column;
    }
    
    .feedback-btn {
        width: 100%;
    }
    
    .feedback-option {
        padding: 12px 14px;
    }
}

/* Responsive adjustments for smaller viewport heights (laptops, tablets) */
@media (max-height: 800px) {
    .feedback-popup {
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
    }
    
    .feedback-popup-header {
        padding: 18px 24px 14px;
    }
    
    .feedback-popup-header h3 {
        font-size: 18px;
    }
    
    .feedback-close-btn {
        top: 14px;
        right: 14px;
        width: 28px;
        height: 28px;
        border-radius: 6px;
    }
    
    .feedback-close-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .feedback-popup-body {
        padding: 18px 24px;
    }
    
    .feedback-options {
        gap: 8px;
    }
    
    .feedback-option {
        padding: 10px 14px;
    }
    
    .feedback-option-label {
        font-size: 13px;
    }
    
    .feedback-option-desc {
        font-size: 12px;
    }
    
    .feedback-popup-footer {
        padding: 14px 24px;
    }
    
    .feedback-progress {
        padding: 0 24px 14px;
    }
}

/* Even smaller viewport heights */
@media (max-height: 650px) {
    .feedback-popup {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }
    
    .feedback-popup-header {
        padding: 14px 20px 12px;
    }
    
    .feedback-popup-header h3 {
        font-size: 16px;
        gap: 8px;
    }
    
    .feedback-popup-header .header-icon {
        width: 24px;
        height: 24px;
    }
    
    .feedback-popup-header .header-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .feedback-close-btn {
        top: 10px;
        right: 10px;
        width: 26px;
        height: 26px;
        border-radius: 6px;
    }
    
    .feedback-close-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .feedback-popup-body {
        padding: 14px 20px;
    }
    
    .feedback-step-title {
        margin: 0 0 12px 0;
        font-size: 14px;
    }
    
    .feedback-options {
        gap: 6px;
    }
    
    .feedback-option {
        padding: 8px 12px;
        border-radius: 10px;
    }
    
    .feedback-option-radio {
        width: 18px;
        height: 18px;
        min-width: 18px;
        margin-right: 10px;
    }
    
    .feedback-option-radio::after {
        width: 6px;
        height: 6px;
    }
    
    .feedback-option-label {
        font-size: 12px;
    }
    
    .feedback-option-desc {
        font-size: 11px;
    }
    
    .feedback-popup-footer {
        padding: 12px 20px;
        gap: 8px;
    }
    
    .feedback-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .feedback-progress {
        padding: 0 20px 10px;
    }
    
    .feedback-progress-step {
        width: 32px;
        height: 3px;
    }
}

/* Improved thumbs button styles */
.page-helpful .helpful-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-helpful .helpful-btn:hover {
    transform: scale(1.08);
}

.page-helpful .helpful-btn:active {
    transform: scale(0.95);
}

.page-helpful .helpful-btn.clicked {
    background: #fff5f7;
    border-color: #fc1154;
}

