/* Coffito Feedback System Styles - Light Theme */

/* ==================== FEEDBACK MODAL ==================== */

/* Feedback Modal Overlay */
.feedback-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feedback-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Feedback Modal Container */
.feedback-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.feedback-modal-overlay.active .feedback-modal {
    transform: translateY(0);
}

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

.feedback-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.feedback-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.feedback-close-btn:hover {
    background: #e0e0e0;
}

.feedback-close-btn svg {
    width: 20px;
    height: 20px;
    stroke: #666;
}

/* Modal Body */
.feedback-modal-body {
    padding: 24px;
}

/* Step Indicator */
.feedback-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.feedback-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    transition: all 0.3s ease;
}

.feedback-step-dot.active {
    background: #c8a97e;
    width: 24px;
    border-radius: 4px;
}

/* Feedback Type Selection */
.feedback-type-selection {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.feedback-type-btn {
    flex: 1;
    padding: 16px;
    border: 2px solid #eee;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.feedback-type-btn:hover {
    border-color: #c8a97e;
}

.feedback-type-btn.active {
    border-color: #c8a97e;
    background: #faf7f2;
}

.feedback-type-btn svg {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
}

.feedback-type-btn span {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Mood Selection */
.feedback-mood-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 16px;
    text-align: center;
}

.feedback-mood-selection {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.feedback-mood-btn {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    max-width: 56px;
    max-height: 56px;
    border-radius: 50%;
    border: 3px solid transparent;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-sizing: border-box;
    padding: 0;
    flex-shrink: 0;
}

.feedback-mood-btn:hover {
    transform: scale(1.1);
}

.feedback-mood-btn.active {
    border-color: #c8a97e;
    background: #faf7f2;
    transform: scale(1.15);
}

/* Category Selection */
.feedback-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.feedback-category-btn {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: all 0.2s ease;
}

.feedback-category-btn:hover {
    border-color: #c8a97e;
    color: #c8a97e;
}

.feedback-category-btn.active {
    background: #c8a97e;
    border-color: #c8a97e;
    color: #fff;
}

/* Message Input */
.feedback-message-container {
    margin-bottom: 24px;
}

.feedback-message-container label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.feedback-message-container textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.feedback-message-container textarea:focus {
    outline: none;
    border-color: #c8a97e;
}

.feedback-message-container textarea::placeholder {
    color: #999;
}

/* Photo Upload */
.feedback-photos-container {
    margin-bottom: 24px;
}

.feedback-photos-container label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.feedback-photos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.feedback-photo-upload,
.feedback-photo-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
}

.feedback-photo-upload {
    border: 2px dashed #ddd;
    background: #fafafa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.feedback-photo-upload:hover {
    border-color: #c8a97e;
    background: #faf7f2;
}

.feedback-photo-upload svg {
    width: 24px;
    height: 24px;
    stroke: #999;
}

.feedback-photo-item {
    position: relative;
}

.feedback-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feedback-photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

/* Contact Info */
.feedback-contact-container {
    margin-bottom: 24px;
}

.feedback-contact-container label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.feedback-contact-container input {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
    margin-bottom: 12px;
}

.feedback-contact-container input:focus {
    outline: none;
    border-color: #c8a97e;
}

.feedback-contact-container input::placeholder {
    color: #999;
}

/* Submit Button */
.feedback-submit-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: #c8a97e;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-submit-btn:hover:not(:disabled) {
    background: #b8956a;
    transform: translateY(-1px);
}

.feedback-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

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

.feedback-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-success-icon svg {
    width: 40px;
    height: 40px;
    stroke: #4caf50;
}

.feedback-success h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.feedback-success p {
    font-size: 15px;
    color: #666;
    margin: 0;
}

/* ==================== REVIEWS SECTION - COFFITO STYLE ==================== */

.reviews-section {
    padding: 50px 20px 60px;
    background: linear-gradient(180deg, #faf7f2 0%, #f5efe6 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative background pattern */
.reviews-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(200, 169, 126, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(200, 169, 126, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.reviews-section-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #3d2b1f;
    margin: 0 0 8px 0;
    position: relative;
}

.reviews-section-subtitle {
    text-align: center;
    font-size: 15px;
    color: #8b7355;
    margin: 0 0 32px 0;
    position: relative;
}

/* Reviews Carousel */
.reviews-carousel-container {
    position: relative;
    overflow: hidden;
    margin: 0 -20px;
    padding: 0 20px;
}

.reviews-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 15px 5px;
    cursor: grab;
}

.reviews-carousel:active {
    cursor: grabbing;
}

.reviews-carousel::-webkit-scrollbar {
    display: none;
}

/* ==================== REVIEW CARD - COFFITO THEMED ==================== */

.review-card {
    flex: 0 0 300px;
    min-width: 300px;
    height: 260px;
    background: linear-gradient(145deg, #ffffff 0%, #fdfcfa 100%);
    border: 1px solid rgba(200, 169, 126, 0.25);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    scroll-snap-align: start;
    box-shadow: 0 4px 20px rgba(139, 115, 85, 0.08);
}

/* Quote decoration */
.review-card::before {
    content: '\201C';
    position: absolute;
    top: -8px;
    left: 16px;
    font-size: 5.5em;
    color: rgba(200, 169, 126, 0.25);
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1;
    pointer-events: none;
    z-index: 0;
    text-shadow: 0 2px 8px rgba(200, 169, 126, 0.08);
}

/* Category background icon - Coffito themed (PNG) */
.review-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -15px;
    width: 100px;
    height: 100px;
    opacity: 0.15;
    transform: rotate(-12deg);
    pointer-events: none;
    z-index: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Category-specific icons */
.review-card[data-category="food"]::after { background-image: url('../images/review-icons/croissant.png'); }
.review-card[data-category="service"]::after { background-image: url('../images/review-icons/coffee.png'); }
.review-card[data-category="atmosphere"]::after { background-image: url('../images/review-icons/couch.png'); }
.review-card[data-category="cleanliness"]::after { background-image: url('../images/review-icons/clean.png'); }
.review-card[data-category="speed"]::after { background-image: url('../images/review-icons/speed.png'); }
.review-card[data-category="other"]::after { background-image: url('../images/review-icons/cake.png'); }
.review-card:not([data-category])::after { background-image: url('../images/review-icons/coffee.png'); }

.review-card:hover {
    transform: translateY(-6px);
    border-color: #c8a97e;
    box-shadow: 0 12px 35px rgba(139, 115, 85, 0.15), 0 0 20px rgba(200, 169, 126, 0.1);
}

/* Review Header */
.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.review-card-author {
    font-size: 16px;
    font-weight: 600;
    color: #3d2b1f;
    font-style: italic;
}

.review-card-date {
    font-size: 12px;
    color: #a89070;
    margin-top: 2px;
}

.review-card-mood {
    font-size: 28px;
    line-height: 1;
}

/* Category Badge */
.review-card-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(200, 169, 126, 0.15) 0%, rgba(200, 169, 126, 0.08) 100%);
    border: 1px solid rgba(200, 169, 126, 0.3);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    color: #9a7b4f;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.review-card-category::before {
    font-size: 14px;
}

.review-card-category[data-cat="food"]::before { content: '🥐'; }
.review-card-category[data-cat="service"]::before { content: '☕'; }
.review-card-category[data-cat="atmosphere"]::before { content: '🛋️'; }
.review-card-category[data-cat="cleanliness"]::before { content: '✨'; }
.review-card-category[data-cat="speed"]::before { content: '⏱️'; }
.review-card-category[data-cat="other"]::before { content: '🍰'; }

/* Review Message */
.review-card-message {
    font-size: 14px;
    line-height: 1.6;
    color: #5a4a3a;
    margin: 0;
    position: relative;
    z-index: 1;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== REVIEW REACTIONS ==================== */

.review-reactions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 8px;
    position: relative;
    z-index: 2;
}

.reaction-bubble {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    background: rgba(200, 169, 126, 0.1);
    border: 1px solid rgba(200, 169, 126, 0.2);
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
}

.reaction-bubble:active {
    transform: scale(0.95);
}

.reaction-bubble.my-reaction {
    background: rgba(200, 169, 126, 0.25);
    border-color: #c8a97e;
}

.reaction-bubble.has-admin::after {
    content: '✦';
    font-size: 8px;
    color: #c8a97e;
    margin-left: 2px;
}

.reaction-add-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px dashed rgba(200, 169, 126, 0.3);
    background: transparent;
    color: #a89070;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.reaction-add-btn:hover {
    background: rgba(200, 169, 126, 0.1);
    border-color: #c8a97e;
}

.reaction-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    display: flex;
    gap: 4px;
    background: #fff;
    border: 1px solid rgba(200, 169, 126, 0.3);
    border-radius: 20px;
    padding: 6px 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    z-index: 100;
    animation: fadeInUp 0.2s ease-out;
}

.reaction-picker span {
    font-size: 22px;
    cursor: pointer;
    padding: 2px;
    border-radius: 8px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.reaction-picker span:hover {
    transform: scale(1.3);
    background: rgba(200, 169, 126, 0.15);
}

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

/* Review Footer */
.review-card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(200, 169, 126, 0.15);
    margin-top: auto;
    position: relative;
    z-index: 1;
}

/* Review Photos */
.review-card-photos {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    position: relative;
    z-index: 1;
}

.review-card-photo {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(200, 169, 126, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-card-photo:hover {
    transform: scale(1.05);
    border-color: #c8a97e;
}

/* Leave Review Button */
.leave-review-btn {
    display: block;
    width: fit-content;
    margin: 32px auto 0;
    padding: 14px 36px;
    background: linear-gradient(135deg, #c8a97e 0%, #b8956a 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(200, 169, 126, 0.35);
    position: relative;
}

.leave-review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 169, 126, 0.45);
}

/* ==================== FLOATING FEEDBACK BUTTON - DRAGGABLE ==================== */

.feedback-float-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c8a97e 0%, #b8956a 100%);
    border: none;
    box-shadow: 0 4px 20px rgba(200, 169, 126, 0.4);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feedback-float-btn:active {
    cursor: grabbing;
}

.feedback-float-btn:hover:not(.dragging) {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(200, 169, 126, 0.5);
}

.feedback-float-btn.dragging {
    cursor: grabbing;
    transform: scale(1.12);
    box-shadow: 0 8px 30px rgba(200, 169, 126, 0.6);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* Magnetic snap animation */
.feedback-float-btn.snapping {
    transition: left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                right 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                bottom 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.2s ease,
                box-shadow 0.2s ease;
}

.feedback-float-btn svg {
    width: 24px;
    height: 24px;
    fill: #fff;
    pointer-events: none;
}

/* Hide when cart/checkout is open */
.feedback-float-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 480px) {
    .feedback-modal {
        max-width: 100%;
        border-radius: 16px;
    }

    .feedback-mood-btn {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        max-width: 48px;
        max-height: 48px;
        font-size: 24px;
    }

    .review-card {
        flex: 0 0 280px;
        min-width: 280px;
        height: 240px;
        padding: 20px;
    }

    .review-card::after {
        width: 85px;
        height: 85px;
        bottom: -18px;
        right: -12px;
    }

    .reviews-section {
        padding: 40px 15px 50px;
    }

    .reviews-section-title {
        font-size: 22px;
    }
}

@media (min-width: 768px) {
    .review-card {
        flex: 0 0 320px;
        min-width: 320px;
        height: 270px;
    }

    .reviews-carousel {
        gap: 24px;
    }
}

@media (min-width: 1024px) {
    .reviews-section {
        padding: 60px 30px 70px;
    }

    .review-card {
        flex: 0 0 350px;
        min-width: 350px;
        height: 280px;
        padding: 28px;
    }

    .review-card::after {
        width: 120px;
        height: 120px;
        bottom: -25px;
        right: -20px;
    }

    .review-card-message {
        font-size: 15px;
    }
}
