/**
 * Reacto Frontend Styles
 * Material Design 3 — Modern Widget Design
 * Compatible with latest browsers & WordPress 6.7+
 */

:root {
    --reacto-primary: #FFC107;
    --reacto-secondary: #006064;
    --reacto-primary-rgb: 255, 193, 7;
    --reacto-secondary-rgb: 0, 96, 100;
    --reacto-surface: #ffffff;
    --reacto-surface-alt: #f8fafc;
    --reacto-border: #e2e8f0;
    --reacto-text: #0f172a;
    --reacto-text-muted: #64748b;
    --reacto-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    --reacto-shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.18);
    --reacto-shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.22);
    --reacto-radius: 16px;
    --reacto-radius-sm: 8px;
    --reacto-radius-full: 9999px;
    --reacto-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --reacto-spring: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark mode — re-map all CSS variables for the widget scope */
@media (prefers-color-scheme: dark) {
    .reacto-widget {
        --reacto-surface: #1a2234;
        --reacto-surface-alt: #111827;
        --reacto-border: #2d3f5a;
        --reacto-text: #e2e8f0;
        --reacto-text-muted: #64748b;
        --reacto-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
        --reacto-shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.6);
    }
}

/* Screen-reader-only utility (visually hidden but accessible) */
.reacto-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Widget Container */
.reacto-widget {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
    line-height: 1.5;
    color: var(--reacto-text);
}

/* Global style isolation — prevent WordPress theme button styles bleeding into widget */
.reacto-widget button,
.reacto-popup button {
    -webkit-appearance: none !important;
    appearance: none !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
}

/* Position Variants */
.reacto-position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.reacto-position-bottom-left {
    bottom: 20px;
    left: 20px;
}

.reacto-position-top-right {
    top: 20px;
    right: 20px;
}

.reacto-position-top-left {
    top: 20px;
    left: 20px;
}

/* Floating Button */
.reacto-widget-button {
    position: relative;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: var(--reacto-primary);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18) !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    border: none !important;
    outline: none !important;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden !important;
    padding: 0 !important;
}

.reacto-widget-button:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(0,0,0,0.22);
}

.reacto-widget-button:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.reacto-widget-emoji {
    font-size: 32px;
    line-height: 1;
}

.reacto-widget-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

/* Pulse — only shown when widget is unread/new */
.reacto-widget-pulse {
    display: none;
}

/* Popup Container */
.reacto-popup {
    position: absolute;
    width: 370px;
    max-width: calc(100vw - 24px);
    background: var(--reacto-surface);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.13), 0 2px 8px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transform-origin: bottom right;
    transform: scale(0.88) translateY(10px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), opacity 0.2s ease;
    border: 1px solid var(--reacto-border);
    will-change: transform, opacity;
}

/* Bottom positions */
.reacto-position-bottom-right .reacto-popup {
    bottom: 80px;
    right: 0;
    transform-origin: bottom right;
}

.reacto-position-bottom-left .reacto-popup {
    bottom: 80px;
    left: 0;
    transform-origin: bottom left;
}

/* Top positions */
.reacto-position-top-right .reacto-popup {
    top: 80px;
    right: 0;
    transform-origin: top right;
}

.reacto-position-top-left .reacto-popup {
    top: 80px;
    left: 0;
    transform-origin: top left;
}

.reacto-popup.reacto-active {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Header — Solid brand color (BeDesk / Intercom style: colored header, white text) */
.reacto-popup-header {
    background: var(--reacto-secondary);
    padding: 18px 20px 16px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.reacto-popup-header-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Emoji mode: semi-transparent circle background */
.reacto-popup-header-icon.reacto-icon-emoji {
    background: rgba(255, 255, 255, 0.2);
    font-size: 22px;
}

/* Image mode: clean circle, logo fills it entirely at any size */
.reacto-popup-header-icon.reacto-icon-image {
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.reacto-popup-header-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 50%;
}

.reacto-popup-header-text {
    flex: 1;
    min-width: 0;
}

.reacto-popup-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
    padding-right: 32px;
    letter-spacing: -0.01em;
}

.reacto-popup-subtitle {
    margin: 2px 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.3;
}

.reacto-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    color: #ffffff !important;
    font-size: 17px;
    line-height: 1;
    font-weight: 300;
    padding: 0 !important;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
    text-shadow: none !important;
}

.reacto-close-btn span {
    display: block;
    line-height: 1;
    font-family: Arial, sans-serif;
}

.reacto-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.reacto-close-btn:active {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0.92);
}

/* Content */
.reacto-popup-content {
    padding: 20px 20px;
    max-height: 480px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

.reacto-popup-content::-webkit-scrollbar {
    width: 4px;
}

.reacto-popup-content::-webkit-scrollbar-track {
    background: transparent;
}

.reacto-popup-content::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}

/* Refeedback Notice */
.reacto-refeedback-notice {
    text-align: center;
    padding: 20px 0;
}

.reacto-refeedback-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.reacto-refeedback-notice p {
    margin: 0 0 20px;
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

.reacto-refeedback-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Emoji Display */
.reacto-emoji-display {
    text-align: center;
    margin-bottom: 20px;
}

.reacto-emoji-large {
    font-size: 52px;
    line-height: 1;
    margin-bottom: 6px;
    transition: transform 0.25s ease;
}

.reacto-emoji-bounce {
    animation: reacto-emoji-bounce 0.5s ease;
}

@keyframes reacto-emoji-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.reacto-emoji-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--reacto-secondary);
}

/* Slider */
.reacto-slider-container {
    margin-bottom: 25px;
}

.reacto-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right,
        #ef4444 0%,
        #f97316 25%,
        #eab308 50%,
        #84cc16 75%,
        #22c55e 100%);
    outline: none;
    cursor: pointer;
}

.reacto-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--reacto-primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: var(--reacto-transition);
}

.reacto-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    border-width: 4px;
}

.reacto-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--reacto-primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: var(--reacto-transition);
}

.reacto-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    border-width: 4px;
}

.reacto-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: #666;
    font-weight: 500;
}

.reacto-slider-value {
    text-align: center;
    margin-top: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--reacto-secondary);
}

/* Feedback Questions Container */
.reacto-questions-container {
    margin-bottom: 20px;
}

.reacto-question-item {
    margin-bottom: 18px;
}

.reacto-question-item:last-child {
    margin-bottom: 0;
}

/* Feedback Text */
.reacto-feedback-text-container {
    margin-bottom: 20px;
}

.reacto-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.reacto-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--reacto-border);
    border-radius: var(--reacto-radius-sm);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    color: var(--reacto-text) !important;
    background: var(--reacto-surface) !important;
    min-height: 88px;
    box-sizing: border-box;
}

.reacto-textarea::placeholder {
    color: var(--reacto-text-muted) !important;
}

.reacto-textarea:focus {
    outline: none;
    border-color: var(--reacto-primary);
    box-shadow: 0 0 0 3px rgba(var(--reacto-primary-rgb), 0.15);
}

/* Contact Fields for Identified Feedback */
.reacto-contact-fields-container {
    margin-bottom: 12px;
}

.reacto-contact-fields-label {
    color: #555;
    font-size: 12px;
    margin-bottom: 6px;
}

.reacto-contact-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 6px;
}

.reacto-contact-input {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid var(--reacto-border);
    border-radius: var(--reacto-radius-sm);
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    color: var(--reacto-text);
    background: var(--reacto-surface);
    box-sizing: border-box;
}

.reacto-contact-input::placeholder {
    color: var(--reacto-text-muted);
}

.reacto-contact-input:focus {
    outline: none;
    border-color: var(--reacto-primary);
    box-shadow: 0 0 0 3px rgba(var(--reacto-primary-rgb), 0.15);
}

/* Media Upload for Screenshot Feedback */
.reacto-media-upload-container {
    margin-bottom: 12px;
}

.reacto-file-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.reacto-file-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f8f9fa;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.reacto-file-button:hover {
    border-color: var(--reacto-secondary);
    background: #f3f4f6;
}

.reacto-file-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.reacto-file-name {
    flex: 1;
    font-size: 13px;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reacto-file-remove {
    padding: 6px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 6px;
    color: #c00;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reacto-file-remove:hover {
    background: #fcc;
}

.reacto-file-remove .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.reacto-file-preview {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
}

.reacto-file-preview img {
    max-width: 100%;
    height: auto;
    display: block;
}

.reacto-file-info {
    margin: 8px 0 0;
    font-size: 11px;
    color: #9ca3af;
}

/* Input field for short answers */
.reacto-input {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid var(--reacto-border);
    border-radius: var(--reacto-radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    color: var(--reacto-text) !important;
    background: var(--reacto-surface) !important;
    box-sizing: border-box;
}

.reacto-input::placeholder {
    color: var(--reacto-text-muted) !important;
}

.reacto-input:focus {
    outline: none;
    border-color: var(--reacto-primary);
    box-shadow: 0 0 0 3px rgba(var(--reacto-primary-rgb), 0.15);
}

/* Buttons */
.reacto-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--reacto-transition);
}

.reacto-btn-primary {
    background: var(--reacto-primary);
    color: #000000;
}

.reacto-btn-primary:hover {
    background: var(--reacto-primary);
    filter: brightness(1.08);
}

.reacto-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.reacto-btn-secondary:hover {
    background: #e5e7eb;
}

.reacto-submit-btn {
    width: 100% !important;
    padding: 12px 16px !important;
    background: var(--reacto-secondary);
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    letter-spacing: 0.01em;
    -webkit-tap-highlight-color: transparent;
    box-shadow: none !important;
    outline: none !important;
    text-shadow: none !important;
}

.reacto-submit-btn:hover:not(:disabled) {
    background: color-mix(in srgb, var(--reacto-secondary) 88%, #000 12%);
}

.reacto-submit-btn:active:not(:disabled) {
    transform: scale(0.99);
}

.reacto-submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.reacto-submit-loader {
    display: inline-block;
}

.reacto-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: reacto-spin 0.6s linear infinite;
}

@keyframes reacto-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Thank You Message */
.reacto-thank-you {
    text-align: center;
    padding: 20px 0;
}

.reacto-thank-you-icon {
    margin-bottom: 20px;
}

.reacto-checkmark {
    display: inline-block;
    width: 60px;
    height: 60px;
    background: var(--reacto-primary);
    border-radius: 50%;
    color: #000000;
    font-size: 36px;
    line-height: 60px;
    animation: reacto-checkmark-pop 0.5s ease-out;
}

@keyframes reacto-checkmark-pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.reacto-thank-you-title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

.reacto-thank-you-message {
    margin: 0;
    font-size: 15px;
    color: #666;
}

/* Footer */
.reacto-popup-footer {
    padding: 10px 20px;
    background: #ffffff;
    border-top: 1px solid #eaecef;
}

.reacto-privacy-notice {
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.reacto-privacy-disclaimer {
    font-size: 11px;
    color: #6b7280;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.reacto-privacy-link {
    font-size: 11px;
    color: var(--reacto-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.reacto-privacy-link:hover {
    text-decoration: underline;
}

.reacto-branding {
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
}

.reacto-branding a {
    text-decoration: none;
    transition: var(--reacto-transition);
}

.reacto-branding a:hover strong {
    text-decoration: underline;
}

.reacto-branding strong {
    color: var(--reacto-secondary);
    font-weight: 700;
}

/* Confetti Canvas */
#reacto-confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999998;
}

/* Tabs */
.reacto-tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #eaecef;
    padding: 0;
    gap: 0;
}

.reacto-tab-btn {
    flex: 1;
    padding: 12px 10px !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    margin-bottom: -1px;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #8c9aaa !important;
    cursor: pointer;
    position: relative;
    transition: color 0.15s ease, border-bottom-color 0.15s ease;
    letter-spacing: 0.01em;
    text-align: center !important;
    box-shadow: none !important;
    outline: none !important;
    line-height: 1.4 !important;
}

.reacto-tab-btn:hover {
    color: var(--reacto-secondary) !important;
    background: transparent !important;
}

.reacto-tab-btn.active {
    color: var(--reacto-secondary) !important;
    border-bottom: 2px solid var(--reacto-secondary) !important;
}

/* Tab Panels */
.reacto-tab-panel {
    display: none;
}

.reacto-tab-panel.active {
    display: block;
}

/* Contact Tab Content */
.reacto-contact-content {
    padding: 4px 0;
}

.reacto-contact-title {
    display: none; /* Title shown in popup header via JS */
}

.reacto-contact-description {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--reacto-text-muted);
    line-height: 1.55;
}

/* Trust Signals */
.reacto-trust-signals {
    background: var(--reacto-surface-alt);
    border: 1px solid var(--reacto-border);
    border-radius: 8px;
    padding: 11px 13px;
    margin-bottom: 14px;
    font-size: 12.5px;
    color: var(--reacto-text-muted);
    display: flex;
    flex-direction: column;
    gap: 0;
}

.reacto-activity-feed,
.reacto-response-time {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

.reacto-activity-feed {
    padding-bottom: 8px;
}

.reacto-response-time.has-border {
    border-top: 1px solid var(--reacto-border);
    padding-top: 8px;
}

.reacto-trust-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* Contact Links */
.reacto-contact-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.reacto-contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--reacto-surface-alt);
    border: 1px solid var(--reacto-border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--reacto-text);
    font-size: 13.5px;
    font-weight: 500;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}

.reacto-contact-link::after {
    content: '›';
    position: absolute;
    right: 14px;
    font-size: 18px;
    color: var(--reacto-text-muted);
    line-height: 1;
    transition: color 0.15s, transform 0.15s;
}

.reacto-contact-link:hover {
    background: var(--reacto-surface);
    border-color: var(--reacto-secondary);
    box-shadow: 0 2px 8px rgba(0, 96, 100, 0.08);
    text-decoration: none;
    color: var(--reacto-text);
}

.reacto-contact-link:hover::after {
    color: var(--reacto-secondary);
    transform: translateX(2px);
}

.reacto-contact-link:active {
    background: var(--reacto-surface);
    transform: scale(0.99);
}

.reacto-contact-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 6px;
}

.reacto-contact-link span {
    flex: 1;
    color: inherit;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 18px;
}

/* Melaaj Profile Card */
.reacto-melaaj-profile-card {
    margin-bottom: 14px;
    position: relative;
}

.reacto-melaaj-profile-link {
    display: block;
    background: var(--reacto-surface-alt);
    border: 1px solid var(--reacto-border);
    border-radius: 12px;
    padding: 14px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}

.reacto-melaaj-profile-link:hover {
    background: var(--reacto-surface);
    border-color: var(--reacto-secondary);
    box-shadow: 0 2px 8px rgba(0, 96, 100, 0.08);
    text-decoration: none;
    color: inherit;
}

/* Melaaj Badge - Top Right */
.reacto-melaaj-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 193, 7, 0.15);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--reacto-secondary);
    border: 1px solid var(--reacto-primary);
}

.reacto-melaaj-badge img {
    width: 14px;
    height: 14px;
}

.reacto-melaaj-badge span {
    line-height: 1;
}

.reacto-melaaj-content {
    display: flex;
    gap: 14px;
    align-items: center;
    padding-right: 60px;
}

.reacto-melaaj-loading {
    text-align: center;
    padding: 20px;
    color: #6b7280;
}

.reacto-melaaj-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 193, 7, 0.2);
    border-top-color: var(--reacto-primary);
    border-radius: 50%;
    animation: reacto-spin 0.8s linear infinite;
    margin-bottom: 10px;
}

.reacto-melaaj-avatar {
    flex-shrink: 0;
}

.reacto-melaaj-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--reacto-primary);
    object-fit: cover;
    background: #ffffff;
}

.reacto-melaaj-info {
    flex: 1;
    min-width: 0;
}

.reacto-melaaj-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--reacto-secondary);
    margin: 0 0 2px;
    line-height: 1.3;
}

.reacto-melaaj-username {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 8px;
    font-weight: 500;
}

.reacto-melaaj-description {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Empty state for contact tab */
.reacto-contact-empty {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.reacto-contact-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.reacto-contact-empty p {
    margin: 0;
    font-size: 14px;
}

/* ===================================
   New Feedback Types Styling
   =================================== */

/* General Rating Container */
.reacto-rating-container {
    padding: 20px 0;
    text-align: center;
}

/* 5 Emoji Rating */
.reacto-emoji5-container {
    padding: 15px 0;
}

.reacto-emoji5-options {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 20px;
}

.reacto-emoji5-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--reacto-transition);
}

.reacto-emoji5-btn:hover {
    background: #f0f1f3;
    border-color: #d1d5db;
}

.reacto-emoji5-btn.active {
    background: var(--reacto-primary-tint, rgba(255, 193, 7, 0.12));
    border-color: var(--reacto-primary);
}

.reacto-emoji5-icon {
    font-size: 32px;
    display: block;
}

.reacto-emoji5-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--reacto-secondary);
    white-space: nowrap;
}

/* Star Rating */
.reacto-stars-container {
    padding: 20px 0;
}

.reacto-stars-wrapper {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.reacto-star-btn {
    font-size: 40px;
    color: #ddd;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--reacto-transition);
    padding: 4px;
    line-height: 1;
}

.reacto-star-btn:hover {
    color: var(--reacto-primary);
    transform: scale(1.1);
}

.reacto-star-btn.active {
    color: var(--reacto-primary);
}

.reacto-stars-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--reacto-secondary);
    margin-top: 10px;
}

/* Thumbs Up/Down */
.reacto-thumbs-container {
    padding: 20px 0;
}

.reacto-thumbs-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.reacto-thumb-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 28px;
    background: #f8f9fa;
    border: 1.5px solid #e8eaed;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    min-width: 130px;
}

.reacto-thumb-btn:hover {
    background: #f0f1f3;
    border-color: #d1d5db;
}

.reacto-thumb-btn.active {
    background: var(--reacto-primary-tint, rgba(255, 193, 7, 0.12));
    border-color: var(--reacto-primary);
}

.reacto-thumb-icon {
    font-size: 48px;
    display: block;
}

.reacto-thumb-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--reacto-secondary);
}

/* NPS (Net Promoter Score) */
.reacto-nps-container {
    padding: 15px 0;
}

.reacto-nps-question {
    font-size: 15px;
    font-weight: 600;
    color: var(--reacto-secondary);
    margin-bottom: 20px;
    text-align: center;
}

.reacto-nps-scale {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.reacto-nps-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--reacto-secondary);
    cursor: pointer;
    transition: var(--reacto-transition);
}

.reacto-nps-btn:hover {
    background: #f0f1f3;
    border-color: #9ca3af;
}

.reacto-nps-btn.active {
    background: var(--reacto-primary);
    border-color: var(--reacto-primary);
    color: #1a1a1a;
}

.reacto-nps-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
}

.reacto-nps-labels span {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* CSAT (Customer Satisfaction) */
.reacto-csat-container {
    padding: 15px 0;
}

.reacto-csat-question {
    font-size: 15px;
    font-weight: 600;
    color: var(--reacto-secondary);
    margin-bottom: 20px;
    text-align: center;
}

.reacto-csat-options {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.reacto-csat-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--reacto-transition);
    min-width: 0;
}

.reacto-csat-btn:hover {
    background: #f0f1f3;
    border-color: #d1d5db;
}

.reacto-csat-btn.active {
    background: var(--reacto-primary-tint, rgba(255, 193, 7, 0.12));
    border-color: var(--reacto-primary);
}

.reacto-csat-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--reacto-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border-radius: 50%;
    border: 2px solid var(--reacto-primary);
    flex-shrink: 0;
}

.reacto-csat-btn.active .reacto-csat-number {
    background: var(--reacto-primary);
    color: var(--reacto-secondary);
}

.reacto-csat-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--reacto-secondary);
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Slider 0-10 */
.reacto-slider10-container {
    padding: 15px 0;
}

.reacto-slider10-question {
    font-size: 15px;
    font-weight: 600;
    color: var(--reacto-secondary);
    margin-bottom: 20px;
    text-align: center;
}

.reacto-slider10-wrapper {
    position: relative;
    padding: 20px 0;
}

.reacto-slider10 {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #f44336, #ff9800, #ffeb3b, #8bc34a, #4caf50);
    outline: none;
    opacity: 0.9;
    transition: opacity 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.reacto-slider10:hover {
    opacity: 1;
}

.reacto-slider10::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--reacto-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: var(--reacto-transition);
}

.reacto-slider10::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.reacto-slider10::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--reacto-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: var(--reacto-transition);
}

.reacto-slider10::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.reacto-slider10-value {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 28px;
    font-weight: 700;
    color: var(--reacto-primary);
}

.reacto-slider10-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.reacto-slider10-labels span {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .reacto-popup {
        width: calc(100vw - 20px);
    }

    .reacto-position-bottom-right .reacto-popup,
    .reacto-position-bottom-left .reacto-popup {
        bottom: 70px;
        left: 10px;
        right: auto;
    }

    .reacto-position-top-right .reacto-popup,
    .reacto-position-top-left .reacto-popup {
        top: 70px;
        left: 10px;
        right: auto;
    }

    .reacto-widget-button {
        width: 50px;
        height: 50px;
    }

    .reacto-widget-emoji {
        font-size: 28px;
    }

    .reacto-emoji-large {
        font-size: 52px;
    }
}

/* Accessibility */
.reacto-widget-button:focus,
.reacto-close-btn:focus,
.reacto-submit-btn:focus,
.reacto-btn:focus {
    outline: 3px solid var(--reacto-primary);
    outline-offset: 2px;
}

/* Animations disabled */
.reacto-no-animations * {
    animation: none !important;
    transition: none !important;
}

/* Floating Feedback Tab */
.reacto-floating-tab {
    position: fixed;
    z-index: 999998;
    cursor: pointer;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    user-select: none;
}

.reacto-floating-tab:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.reacto-floating-tab:active {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* Right side position */
.reacto-floating-tab-right {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    border-radius: 8px 0 0 8px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.reacto-floating-tab-right:hover {
    right: -2px;
    transform: translateY(-50%) translateX(4px);
}

.reacto-floating-tab-right:active {
    right: 0;
    transform: translateY(-50%) translateX(0);
}

/* Left side position */
.reacto-floating-tab-left {
    top: 50%;
    left: 0;
    transform: translateY(-50%) rotate(180deg);
    border-radius: 8px 0 0 8px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.reacto-floating-tab-left:hover {
    left: -2px;
    transform: translateY(-50%) rotate(180deg) translateX(4px);
}

.reacto-floating-tab-left:active {
    left: 0;
    transform: translateY(-50%) rotate(180deg) translateX(0);
}

.reacto-floating-tab-text {
    display: block;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Mobile responsiveness for floating tab */
@media (max-width: 768px) {
    .reacto-floating-tab {
        font-size: 13px;
        padding: 12px 18px;
    }
}

/* ==========================================
   Embedded Widget Styles (Shortcode)
   ========================================== */

/* Base embedded widget */
.reacto-embedded-widget {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Inline widget */
.reacto-embedded-inline .reacto-embedded-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Popup widget button */
.reacto-embedded-popup-trigger {
    text-align: center;
}

.reacto-embedded-button {
    color: #fff;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.reacto-embedded-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.reacto-embedded-button:active {
    transform: translateY(0);
}

.reacto-embedded-emoji {
    font-size: 20px;
}

/* Popup overlay */
.reacto-embedded-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
}

.reacto-embedded-popup-content {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: reactoSlideUp 0.3s ease;
}

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

.reacto-embedded-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.reacto-embedded-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Minimal widget */
.reacto-embedded-minimal {
    background: #f9f9f9;
    border-left: 4px solid var(--reacto-secondary);
    padding: 20px;
    border-radius: 8px;
}

/* Widget title */
.reacto-embedded-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    text-align: center;
}

.reacto-embedded-minimal .reacto-embedded-title {
    font-size: 18px;
    text-align: left;
    margin-bottom: 15px;
}

/* Feedback form */
.reacto-embedded-feedback-form {
    max-width: 100%;
}

/* Slider container */
.reacto-feedback-slider-container {
    text-align: center;
    margin-bottom: 20px;
}

.reacto-feedback-slider-container .reacto-emoji-display {
    font-size: 48px;
    margin-bottom: 15px;
    transition: transform 0.2s ease;
}

.reacto-embedded-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #ff4444 0%, #ffaa00 50%, #00cc66 100%);
    outline: none;
    -webkit-appearance: none;
    margin: 15px 0;
}

.reacto-embedded-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 3px solid var(--reacto-primary);
}

.reacto-embedded-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 3px solid var(--reacto-primary);
}

.reacto-slider-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--reacto-secondary);
    margin-top: 10px;
}

/* Emoji 5 buttons - Embedded Widget Only */
.reacto-embedded-widget .reacto-emoji5-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.reacto-embedded-widget .reacto-emoji5-btn {
    flex: 1;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 15px;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reacto-embedded-widget .reacto-emoji5-btn:hover {
    transform: scale(1.1);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.reacto-embedded-widget .reacto-emoji5-btn.active {
    border-color: var(--reacto-primary);
    background: rgba(var(--reacto-primary-rgb), 0.08);
    transform: scale(1.15);
}

/* Star rating - Embedded Widget Only */
.reacto-embedded-widget .reacto-stars-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 40px;
}

.reacto-embedded-widget .reacto-star {
    cursor: pointer;
    opacity: 0.3;
    transition: all 0.2s ease;
}

.reacto-embedded-widget .reacto-star:hover,
.reacto-embedded-widget .reacto-star.active {
    opacity: 1;
    transform: scale(1.1);
}

/* Thumbs buttons - Embedded Widget Only */
.reacto-embedded-widget .reacto-thumbs-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 25px;
    padding: 20px 0;
}

.reacto-embedded-widget .reacto-thumb-btn {
    background: #f8f9fa;
    border: 1.5px solid #e0e0e0;
    border-radius: 50%;
    width: 110px;
    height: 110px;
    min-width: 110px;
    min-height: 110px;
    padding: 0;
    font-size: 50px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reacto-embedded-widget .reacto-thumb-btn:hover {
    background: #f0f1f3;
    border-color: #c8cfd8;
}

.reacto-embedded-widget .reacto-thumb-btn:active {
    background: #e8eaed;
}

.reacto-embedded-widget .reacto-thumb-btn.active {
    border-color: var(--reacto-primary);
    background: #fff8e1;
}

/* NPS buttons - Embedded Widget Only */
.reacto-embedded-widget .reacto-nps-container {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 20px;
}

.reacto-embedded-widget .reacto-nps-btn {
    flex: 1;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 12px 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.reacto-embedded-widget .reacto-nps-btn:hover {
    background: #e8e8e8;
}

.reacto-embedded-widget .reacto-nps-btn.active {
    border-color: var(--reacto-primary);
    background: var(--reacto-primary);
    color: #fff;
}

/* Feedback text */
.reacto-feedback-text-group {
    margin-bottom: 15px;
}

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

.reacto-embedded-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.reacto-embedded-textarea:focus {
    outline: none;
    border-color: var(--reacto-primary);
    box-shadow: 0 0 0 3px rgba(var(--reacto-primary-rgb), 0.1);
}

/* Contact fields */
.reacto-contact-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.reacto-contact-name,
.reacto-contact-email {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.reacto-contact-name:focus,
.reacto-contact-email:focus {
    outline: none;
    border-color: var(--reacto-primary);
    box-shadow: 0 0 0 3px rgba(var(--reacto-primary-rgb), 0.1);
}

/* Submit button */
.reacto-embedded-submit {
    width: 100%;
    color: #fff;
    border: none;
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.reacto-embedded-submit:hover {
    filter: brightness(0.92);
}

.reacto-embedded-submit:active {
    filter: brightness(0.85);
}

.reacto-embedded-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Thank you message */
.reacto-embedded-thank-you {
    text-align: center;
    padding: 40px 20px;
}

.reacto-thank-you-icon {
    width: 60px;
    height: 60px;
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 15px;
    animation: reactoCheckmark 0.4s ease;
}

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

.reacto-thank-you-message {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Mobile responsiveness for embedded widgets */
@media (max-width: 768px) {
    .reacto-embedded-popup-content {
        padding: 30px 20px;
    }

    .reacto-embedded-inline .reacto-embedded-container {
        padding: 20px;
    }

    .reacto-contact-group {
        grid-template-columns: 1fr;
    }

    .reacto-nps-container {
        gap: 4px;
    }

    .reacto-nps-btn {
        padding: 10px 6px;
        font-size: 14px;
    }

    .reacto-emoji5-container {
        gap: 6px;
    }

    .reacto-emoji5-btn {
        font-size: 28px;
        padding: 12px;
    }
}

/* ========================================
   WooCommerce Post-Purchase Feedback Styles
   ======================================== */

.reacto-woo-feedback-section {
    display: none;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.reacto-woo-feedback-section h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.reacto-woo-feedback-section > p {
    margin: 0 0 25px 0;
    font-size: 16px;
    color: #666;
}

.reacto-woo-feedback-form {
    max-width: 600px;
    margin: 0 auto;
}

/* WooCommerce Emoji 5 buttons */
.reacto-woo-emoji5-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.reacto-woo-emoji5-btn {
    background: #f8f9fa;
    border: 3px solid #e0e0e0;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    font-size: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.reacto-woo-emoji5-btn:hover {
    transform: scale(1.1);
    border-color: #bbb;
}

.reacto-woo-emoji5-btn.active {
    border-color: var(--reacto-primary);
    background: rgba(var(--reacto-primary-rgb), 0.08);
    transform: scale(1.15);
}

/* WooCommerce Stars */
.reacto-woo-stars-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.reacto-woo-star {
    background: transparent;
    border: none;
    font-size: 48px;
    cursor: pointer;
    transition: all 0.2s ease;
    filter: grayscale(100%);
    opacity: 0.4;
    padding: 0;
}

.reacto-woo-star:hover,
.reacto-woo-star.active {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* WooCommerce Thumbs */
.reacto-woo-thumbs-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
}

.reacto-woo-thumb-btn {
    background: #f8f9fa;
    border: 1.5px solid #e0e0e0;
    border-radius: 50%;
    width: 96px;
    height: 96px;
    min-width: 96px;
    min-height: 96px;
    padding: 0;
    font-size: 44px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reacto-woo-thumb-btn:hover {
    background: #f0f1f3;
    border-color: #c8cfd8;
}

.reacto-woo-thumb-btn.active {
    border-color: var(--reacto-primary);
    background: #fff8e1;
}

/* WooCommerce NPS */
.reacto-woo-nps-container {
    margin-bottom: 25px;
}

.reacto-woo-nps-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
}

.reacto-woo-nps-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.reacto-woo-nps-btn {
    flex: 0 0 auto;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 12px 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    min-width: 42px;
}

.reacto-woo-nps-btn:hover {
    background: #e8e8e8;
}

.reacto-woo-nps-btn.active {
    border-color: var(--reacto-primary);
    background: var(--reacto-primary);
    color: #fff;
}

/* WooCommerce Slider (0-10 scale) */
.reacto-woo-slider-container {
    text-align: center;
    margin-bottom: 25px;
}

.reacto-woo-slider {
    width: 100%;
    max-width: 500px;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #ff6b6b, #feca57, #48dbfb, #1dd1a1);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 10px;
}

.reacto-woo-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--reacto-primary);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.reacto-woo-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--reacto-primary);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.reacto-woo-slider-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--reacto-secondary);
}

/* WooCommerce Emoji with Slider */
.reacto-woo-emoji-container {
    text-align: center;
    margin-bottom: 25px;
}

.reacto-woo-emoji-display {
    font-size: 72px;
    margin-bottom: 15px;
    transition: transform 0.2s ease;
}

/* WooCommerce Feedback Text */
.reacto-woo-feedback-text {
    margin-bottom: 20px;
}

.reacto-woo-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s ease;
}

.reacto-woo-textarea:focus {
    outline: none;
    border-color: var(--reacto-primary);
    box-shadow: 0 0 0 3px rgba(var(--reacto-primary-rgb), 0.1);
}

/* WooCommerce Submit Button */
.reacto-woo-submit-btn {
    width: 100%;
    background: var(--reacto-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.reacto-woo-submit-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--reacto-primary-rgb), 0.3);
}

.reacto-woo-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.reacto-woo-submit-loader {
    font-size: 20px;
}

/* WooCommerce Thank You */
.reacto-woo-thank-you {
    text-align: center;
    padding: 40px 20px;
}

.reacto-woo-thank-you-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: reactoCheckmark 0.6s ease;
}

.reacto-woo-thank-you h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.reacto-woo-thank-you p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

/* WooCommerce Mobile Responsiveness */
@media (max-width: 768px) {
    .reacto-woo-feedback-section {
        padding: 20px;
    }

    .reacto-woo-emoji5-btn {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }

    .reacto-woo-star {
        font-size: 40px;
    }

    .reacto-woo-thumb-btn {
        width: 80px;
        height: 80px;
        min-width: 80px;
        min-height: 80px;
        font-size: 40px;
    }

    .reacto-woo-nps-buttons {
        gap: 3px;
    }

    .reacto-woo-nps-btn {
        padding: 10px 6px;
        font-size: 14px;
        min-width: 35px;
    }

    .reacto-woo-emoji-display {
        font-size: 56px;
    }
}

/* ==========================================
   Toast Notification Component
   (replaces browser alert() calls)
   ========================================== */

#reacto-toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999999;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
    width: max-content;
    max-width: calc(100vw - 32px);
}

.reacto-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #1e293b;
    color: #f1f5f9;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    animation: reacto-toast-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    min-width: 220px;
    max-width: 360px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    line-height: 1.4;
}

.reacto-toast.reacto-toast-out {
    animation: reacto-toast-out 0.25s ease forwards;
}

.reacto-toast-icon {
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1;
}

.reacto-toast-message {
    flex: 1;
}

.reacto-toast-success {
    background: #064e3b;
    border-color: rgba(52, 211, 153, 0.25);
}

.reacto-toast-success .reacto-toast-icon::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #10b981;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.reacto-toast-error {
    background: #450a0a;
    border-color: rgba(248, 113, 113, 0.25);
}

.reacto-toast-error .reacto-toast-icon::before {
    content: '✕';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.reacto-toast-warning {
    background: #422006;
    border-color: rgba(251, 191, 36, 0.25);
}

.reacto-toast-warning .reacto-toast-icon::before {
    content: '!';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #f59e0b;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
}

.reacto-toast-info {
    background: #0c1a2e;
    border-color: rgba(96, 165, 250, 0.25);
}

.reacto-toast-info .reacto-toast-icon::before {
    content: 'i';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    font-size: 12px;
    font-style: italic;
    font-weight: 800;
    color: #fff;
}

@keyframes reacto-toast-in {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.92);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes reacto-toast-out {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(8px) scale(0.95);
    }
}

/* ==========================================
   Dark Mode Overrides for Widget
   ========================================== */

@media (prefers-color-scheme: dark) {
    /* Popup shell */
    .reacto-popup {
        background: #1a2234;
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    }

    .reacto-popup-inner {
        background: #1a2234;
    }

    /* Popup content area */
    .reacto-popup-content {
        scrollbar-color: #334155 transparent;
    }

    .reacto-popup-content::-webkit-scrollbar-thumb {
        background: #334155;
    }

    /* Text inputs */
    .reacto-textarea,
    .reacto-input,
    .reacto-contact-input {
        background: #0f172a !important;
        color: #e2e8f0 !important;
        border-color: #2d3f5a !important;
    }

    .reacto-textarea:focus,
    .reacto-input:focus,
    .reacto-contact-input:focus {
        border-color: var(--reacto-secondary) !important;
        box-shadow: 0 0 0 2px rgba(0, 96, 100, 0.25) !important;
    }

    .reacto-textarea::placeholder,
    .reacto-input::placeholder,
    .reacto-contact-input::placeholder {
        color: #4a5568 !important;
    }

    /* Footer */
    .reacto-popup-footer {
        background: #111827;
        border-top-color: #1e293b;
    }

    .reacto-privacy-disclaimer,
    .reacto-branding {
        color: #4a5568;
    }

    .reacto-branding a,
    .reacto-privacy-link {
        color: #64748b;
    }

    /* Tabs */
    .reacto-tabs {
        background: #111827;
        border-bottom-color: #1e293b;
    }

    .reacto-tab-btn {
        color: #64748b !important;
    }

    .reacto-tab-btn:hover {
        color: #94a3b8 !important;
    }

    .reacto-tab-btn.active {
        color: #5eead4 !important;
        border-bottom-color: #5eead4 !important;
    }

    /* Rating buttons */
    .reacto-emoji5-btn,
    .reacto-thumb-btn,
    .reacto-nps-btn,
    .reacto-csat-btn {
        background: #1e293b;
        border-color: #2d3f5a;
        color: #e2e8f0;
    }

    .reacto-emoji5-btn:hover,
    .reacto-nps-btn:hover,
    .reacto-csat-btn:hover,
    .reacto-thumb-btn:hover {
        background: #0f172a;
        border-color: #334155;
    }

    .reacto-emoji5-btn.active,
    .reacto-thumb-btn.active,
    .reacto-nps-btn.active,
    .reacto-csat-btn.active {
        border-color: var(--reacto-secondary) !important;
        color: var(--reacto-secondary) !important;
        background: rgba(0, 96, 100, 0.15) !important;
    }

    .reacto-star-btn {
        color: #334155;
    }

    .reacto-star-btn.active,
    .reacto-star-btn.hovered {
        color: var(--reacto-primary);
    }

    /* Slider */
    .reacto-slider {
        background: #1e293b;
    }

    .reacto-slider-value {
        color: #94a3b8;
    }

    .reacto-slider-labels {
        color: #4a5568;
    }

    /* Feedback label */
    .reacto-label {
        color: #94a3b8;
    }

    .reacto-emoji-label {
        color: #94a3b8;
    }

    /* Submit button */
    .reacto-submit-btn {
        background: var(--reacto-secondary) !important;
        color: #ffffff !important;
    }

    .reacto-submit-btn:hover:not(:disabled) {
        background: #00838f !important;
    }

    /* Contact section */
    .reacto-contact-description {
        color: #64748b;
    }

    .reacto-trust-signals {
        background: #0f172a;
        border-color: #1e293b;
        color: #64748b;
    }

    .reacto-response-time.has-border {
        border-top-color: #1e293b;
    }

    .reacto-contact-link {
        background: #1e293b;
        border-color: #2d3f5a;
        color: #e2e8f0;
    }

    .reacto-contact-link:hover {
        background: #253347;
        border-color: var(--reacto-secondary);
        box-shadow: 0 2px 8px rgba(0, 96, 100, 0.2);
    }

    .reacto-contact-link::after {
        color: #334155;
    }

    .reacto-contact-link:hover::after {
        color: #5eead4;
    }

    .reacto-melaaj-profile-link {
        background: #1e293b;
        border-color: #2d3f5a;
        color: #e2e8f0;
    }

    .reacto-melaaj-profile-link:hover {
        background: #253347;
        border-color: var(--reacto-secondary);
    }

    .reacto-melaaj-name {
        color: #e2e8f0;
    }

    .reacto-melaaj-username,
    .reacto-melaaj-description {
        color: #64748b;
    }

    .reacto-melaaj-loading {
        color: #4a5568;
    }

    /* Dynamic questions */
    .reacto-question-item .reacto-input {
        background: #0f172a !important;
        border-color: #2d3f5a !important;
        color: #e2e8f0 !important;
    }

    /* Refeedback notice */
    .reacto-refeedback-notice {
        background: #1e293b;
        border-color: #2d3f5a;
        color: #e2e8f0;
    }

    /* Thank you */
    .reacto-thank-you-title {
        color: #e2e8f0;
    }

    .reacto-thank-you-message {
        color: #94a3b8;
    }

    /* File upload */
    .reacto-file-button {
        background: #1e293b;
        border-color: #2d3f5a;
        color: #94a3b8;
    }

    .reacto-file-name {
        color: #64748b;
    }

    .reacto-file-info {
        color: #4a5568;
    }
}

/* ==========================================
   Reduced Motion
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    .reacto-widget-button {
        animation: none;
    }
    .reacto-widget-pulse {
        animation: none;
    }
    .reacto-popup {
        transition: opacity 0.15s ease;
    }
    .reacto-toast {
        animation: none;
    }
    * {
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   High-Contrast / Accessibility
   ========================================== */

@media (forced-colors: active) {
    .reacto-widget-button,
    .reacto-submit-btn,
    .reacto-btn {
        border: 2px solid ButtonText;
    }
}

/* Better keyboard focus indicators */
.reacto-widget-button:focus-visible,
.reacto-close-btn:focus-visible,
.reacto-submit-btn:focus-visible,
.reacto-btn:focus-visible,
.reacto-emoji5-btn:focus-visible,
.reacto-star-btn:focus-visible,
.reacto-thumb-btn:focus-visible,
.reacto-nps-btn:focus-visible,
.reacto-csat-btn:focus-visible,
.reacto-tab-btn:focus-visible {
    outline: 3px solid var(--reacto-primary);
    outline-offset: 3px;
}
