/**
 * Store Rating Modal Styles
 * ÇiftçidenEve - Modern Rating Popup
 * Follows CLAUDE.md Design System
 */

/* ============================================
   RATING POPUP CONTAINER
   ============================================ */
.rating-popup-container.container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-width: 550px;
    width: 95%;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
}

/* Popup Header */
.rating-popup-container .rating-popup-header {
    background: linear-gradient(135deg, #1A6355 0%, #14524a 100%);
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.rating-popup-container .rating-popup-header-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rating-popup-container .rating-popup-header-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.rating-popup-container .rating-popup-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.rating-popup-container .rating-popup-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin: 4px 0 0;
}

/* Rating Summary Bar */
.rating-popup-container .rating-popup-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px 25px;
    background: #faf7f4;
    border-bottom: 1px solid #e6e6e6;
}

.rating-popup-container .rating-popup-score {
    display: flex;
    align-items: baseline;
}

.rating-popup-container .rating-popup-score-value {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: #1A6355;
    line-height: 1;
}

.rating-popup-container .rating-popup-score-max {
    font-size: 18px;
    font-weight: 400;
    color: #7d91a3;
    margin-left: 2px;
}

.rating-popup-container .rating-popup-stars {
    display: flex;
    gap: 4px;
}

.rating-popup-container .rating-popup-stars svg {
    width: 24px;
    height: 24px;
    color: #e6e6e6;
    transition: color 0.2s;
}

.rating-popup-container .rating-popup-stars svg.active {
    color: #f5a623;
}

.rating-popup-container .rating-popup-count {
    font-size: 14px;
    color: #7d91a3;
    padding: 6px 14px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e6e6e6;
}

/* ============================================
   COMMENTS LIST
   ============================================ */
.rating-popup-container .list-7 {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rating-popup-container .sp-scroll {
    max-height: 350px;
    overflow-y: auto;
    padding: 20px 25px;
}

/* Custom scrollbar */
.rating-popup-container .sp-scroll::-webkit-scrollbar {
    width: 6px;
}

.rating-popup-container .sp-scroll::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.rating-popup-container .sp-scroll::-webkit-scrollbar-thumb {
    background: #c8c0bb;
    border-radius: 3px;
}

.rating-popup-container .sp-scroll::-webkit-scrollbar-thumb:hover {
    background: #1A6355;
}

/* Comment Item */
.rating-popup-container .comment {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid #e6e6e6;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.rating-popup-container .comment:last-child {
    margin-bottom: 0;
}

.rating-popup-container .comment:hover {
    border-color: #1A6355;
    box-shadow: 0 2px 8px rgba(26, 99, 85, 0.1);
}

.rating-popup-container .comment.mine {
    background: linear-gradient(135deg, #FFF3E5 0%, #fff 100%);
    border-color: #e79275;
}

/* Comment Avatar */
.rating-popup-container .comment .avatar {
    flex-shrink: 0;
    float: none;
    margin: 0;
}

.rating-popup-container .comment .avatar a {
    display: block;
}

.rating-popup-container .comment .avatar img {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50% !important;
    border: 2px solid #1A6355 !important;
    object-fit: cover;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
    margin: 0 !important;
}

.rating-popup-container .comment .avatar img:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(26, 99, 85, 0.2);
}

/* Comment Content Wrapper */
.rating-popup-container .comment .comment-content {
    flex: 1;
    min-width: 0;
}

/* User Rating Badge - Inline with name */
.rating-popup-container .comment .user-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #f5a623 0%, #e89b1c 100%);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 8px;
    vertical-align: middle;
    position: static;
    float: none;
}

.rating-popup-container .comment .user-rating .color-2 {
    display: none;
}

.rating-popup-container .comment .user-rating .color-3 {
    color: #fff;
    font-weight: 600;
    font-size: 12px;
}

/* Comment Header (Name + Rating) */
.rating-popup-container .comment .comment-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

/* Comment Title (Username) */
.rating-popup-container .comment .title-5 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    padding: 0;
    display: inline;
}

.rating-popup-container .comment .title-5 a {
    color: #1A6355;
    text-decoration: none;
    transition: color 0.2s;
}

.rating-popup-container .comment .title-5 a:hover {
    color: #b9475e;
}

/* Comment Date - Inline in header */
.rating-popup-container .comment .comment-date {
    font-size: 11px;
    color: #9ca3af;
    margin-left: auto;
}

/* Legacy date style */
.rating-popup-container .comment .text-2 {
    display: none;
}

/* Comment Text */
.rating-popup-container .comment .text-1 {
    font-size: 14px;
    color: #4D4D4D;
    line-height: 1.5;
    margin: 8px 0 0;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #1A6355;
    clear: none;
}

/* No Comment - Rating Only Card */
.rating-popup-container .comment.no-comment {
    padding: 10px 15px;
    align-items: center;
}

.rating-popup-container .comment.no-comment .comment-header {
    margin-bottom: 0;
}

.rating-popup-container .comment.no-comment .avatar img {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    min-height: 36px;
}

/* No Comments Message */
.rating-popup-container .notification {
    padding: 30px 20px;
    text-align: center;
    border-radius: 8px;
    font-size: 14px;
    margin: 0;
}

.rating-popup-container .notification-color-4 {
    background: #FFF3E5;
    color: #7d91a3;
    border: 1px dashed #e6e6e6;
}

.rating-popup-container .notification-color-2 {
    background: #e8f5e9;
    color: #1A6355;
    border: 1px solid #c8e6c9;
}

.rating-popup-container .notification-color-1 {
    background: #ffebee;
    color: #d63e2e;
    border: 1px solid #ffcdd2;
}

/* ============================================
   RATING FORM
   ============================================ */
.rating-popup-container .store-rating-create {
    background: #faf7f4;
    padding: 20px 25px;
    border-top: 1px solid #e6e6e6;
}

.rating-popup-container .store-rating-create .avatar {
    float: left;
    margin-right: 12px;
}

.rating-popup-container .store-rating-create .avatar img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #1A6355;
}

/* Textarea */
.rating-popup-container .store-rating-create textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px 16px;
    font-size: 14px;
    font-family: 'Fira Sans', sans-serif;
    color: #4D4D4D;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    background: #fff;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.rating-popup-container .store-rating-create textarea:focus {
    outline: none;
    border-color: #1A6355;
    box-shadow: 0 0 0 3px rgba(26, 99, 85, 0.1);
}

.rating-popup-container .store-rating-create textarea::placeholder {
    color: #b8b8b8;
}

/* Rating Stars Section */
.rating-popup-container .rating {
    margin-top: 15px;
}

.rating-popup-container .table-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.rating-popup-container .table-grid-cell {
    flex: 1;
    min-width: 150px;
}

.rating-popup-container .table-grid-cell.tright {
    text-align: right;
}

/* Stars Rating */
.rating-popup-container .store-rating-create .rating {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-popup-container .store-rating-create .rating .color-3 {
    font-size: 14px;
    font-weight: 500;
    color: #1A6355;
}

.rating-popup-container .store-rating-create .stars {
    display: flex;
    gap: 4px;
}

.rating-popup-container .store-rating-create .stars a {
    font-size: 28px;
    color: #e6e6e6;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.rating-popup-container .store-rating-create .stars a:hover {
    color: #f5a623;
    transform: scale(1.15);
}

.rating-popup-container .store-rating-create .stars a.active {
    color: #f5a623;
}

/* Submit Button */
.rating-popup-container .store-rating-create .event-rate {
    background: #b9475e;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rating-popup-container .store-rating-create .event-rate:hover {
    background: #e79275;
    transform: translateY(-2px);
}

/* Status Messages */
.rating-popup-container #store_rating_status {
    margin: 0 0 15px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
}

/* ============================================
   ICON OVERRIDES FOR STARS
   ============================================ */
.rating-popup-container .icon.icon-67 {
    background: none !important;
    width: auto;
    height: auto;
    display: inline-block;
}

.rating-popup-container .icon.icon-67:before {
    content: '★';
    font-size: 24px;
    color: #e6e6e6;
    transition: color 0.2s;
}

.rating-popup-container .icon.icon-67.active:before,
.rating-popup-container .icon.icon-67:hover:before {
    color: #f5a623;
}

.rating-popup-container .icon.icon-67.disabled {
    pointer-events: none;
}

/* ============================================
   MAGNIFIC POPUP OVERRIDES
   ============================================ */
.mfp-bg {
    background: rgba(0, 0, 0, 0.6);
}

.mfp-content .rating-popup-container {
    animation: popupFadeIn 0.3s ease-out;
}

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

/* Close Button */
.mfp-close {
    color: #fff !important;
    opacity: 0.8;
    font-size: 32px;
    right: 5px;
    top: 5px;
}

.mfp-close:hover {
    opacity: 1;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 670px) {
    .rating-popup-container.container {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        min-height: 100vh;
    }

    .rating-popup-container .rating-popup-header {
        padding: 18px 20px;
    }

    .rating-popup-container .rating-popup-title {
        font-size: 20px;
    }

    .rating-popup-container .rating-popup-summary {
        flex-wrap: wrap;
        gap: 15px;
        padding: 15px 20px;
    }

    .rating-popup-container .rating-popup-score-value {
        font-size: 36px;
    }

    .rating-popup-container .rating-popup-stars svg {
        width: 20px;
        height: 20px;
    }

    .rating-popup-container .sp-scroll {
        padding: 15px 20px;
        max-height: calc(100vh - 400px);
    }

    .rating-popup-container .comment {
        padding: 12px;
        gap: 10px;
    }

    .rating-popup-container .comment .avatar img {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px;
        min-height: 40px;
    }

    .rating-popup-container .comment .title-5 {
        font-size: 15px;
    }

    .rating-popup-container .comment .text-1 {
        padding: 8px 10px;
        font-size: 13px;
    }

    .rating-popup-container .store-rating-create {
        padding: 15px 20px 25px;
    }

    .rating-popup-container .table-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .rating-popup-container .table-grid-cell.tright {
        text-align: center;
    }

    .rating-popup-container .store-rating-create .event-rate {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .rating-popup-container .rating-popup-header {
        padding: 15px;
    }

    .rating-popup-container .rating-popup-header-icon {
        width: 40px;
        height: 40px;
    }

    .rating-popup-container .rating-popup-title {
        font-size: 18px;
    }

    .rating-popup-container .sp-scroll {
        padding: 12px 15px;
    }

    .rating-popup-container .comment {
        padding: 10px;
        gap: 8px;
    }

    .rating-popup-container .comment .avatar img {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px;
        min-height: 36px;
    }

    .rating-popup-container .comment .title-5 {
        font-size: 14px;
    }

    .rating-popup-container .comment .user-rating {
        padding: 2px 8px;
        font-size: 11px;
    }

    .rating-popup-container .comment .text-2 {
        font-size: 10px;
        margin-bottom: 6px;
    }

    .rating-popup-container .comment .text-1 {
        padding: 8px 10px;
        font-size: 12px;
    }

    .rating-popup-container .store-rating-create textarea {
        min-height: 80px;
    }

    .rating-popup-container .store-rating-create .stars a {
        font-size: 24px;
    }
}
