/* ===================================
   REVIEW MODAL STYLES
   =================================== */

/* Modal Overlay */
.review-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.review-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.review-modal {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 28px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.8) translateY(40px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.review-modal-overlay.active .review-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Modal Header */
.review-modal-header {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 50%, #3B82F6 100%);
    padding: 40px 40px 50px;
    position: relative;
    overflow: hidden;
    border-radius: 28px 28px 0 0;
}

.review-modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.review-modal-header::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 50% 50% 0 0;
}

.review-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.review-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg) scale(1.1);
}

.review-modal-close i {
    color: white;
    font-size: 20px;
}

.review-modal-header h2 {
    color: white;
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.review-modal-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 0;
    position: relative;
    z-index: 1;
}

.review-modal-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.review-modal-icon i {
    font-size: 32px;
    color: white;
}

/* Modal Body */
.review-modal-body {
    padding: 20px 40px 40px;
}

/* Star Rating */
.star-rating-container {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.star-rating-container label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 15px;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 8px;
    direction: rtl;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 42px;
    color: #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
    position: relative;
}

.star-rating label::before {
    content: '\f005';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #fbbf24;
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.5));
}

.star-rating label:active {
    transform: scale(0.95);
}

.rating-text {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text);
    height: 20px;
    transition: all 0.3s ease;
}

.rating-text.active {
    color: var(--primary);
    font-weight: 600;
}

/* Form Styles */
.review-form .form-group {
    margin-bottom: 20px;
}

.review-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 8px;
}

.review-form label span {
    color: #ef4444;
}

.review-form input,
.review-form select,
.review-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 15px;
    font-family: inherit;
    background: white;
    color: var(--secondary);
    transition: all 0.3s ease;
}

.review-form input:focus,
.review-form select:focus,
.review-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.review-form input::placeholder,
.review-form textarea::placeholder {
    color: #94a3b8;
}

.review-form textarea {
    min-height: 120px;
    resize: vertical;
}

.review-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 45px;
}

/* Form Row */
.form-row-review {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Submit Button */
.review-submit-btn {
    width: 100%;
    padding: 18px 30px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.review-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.review-submit-btn:hover::before {
    left: 100%;
}

.review-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.35);
}

.review-submit-btn:active {
    transform: translateY(-1px);
}

.review-submit-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.review-submit-btn:hover i {
    transform: translateX(5px);
}

.review-submit-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading State */
.review-submit-btn.loading {
    pointer-events: none;
}

.review-submit-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* Success Message */
.review-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.review-success.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-success-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.3);
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.review-success-icon i {
    font-size: 42px;
    color: white;
}

.review-success h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
}

.review-success p {
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.review-success-close {
    padding: 14px 35px;
    border: none;
    border-radius: 12px;
    background: var(--secondary);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.review-success-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
}

/* Error Message */
.review-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: none;
}

.review-error.active {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.review-error i {
    color: #ef4444;
    font-size: 20px;
}

.review-error span {
    color: #dc2626;
    font-size: 14px;
    font-weight: 500;
}

/* Header Review Button */
.btn-review {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3) !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-review:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.4) !important;
}

.btn-review i {
    font-size: 14px;
}

/* Responsive */
@media (max-width: 600px) {
    .review-modal {
        max-height: 95vh;
        border-radius: 24px;
    }

    .review-modal-header {
        padding: 30px 25px 45px;
    }

    .review-modal-header h2 {
        font-size: 22px;
    }

    .review-modal-body {
        padding: 15px 25px 30px;
    }

    .form-row-review {
        grid-template-columns: 1fr;
    }

    .star-rating label {
        font-size: 36px;
    }

    .star-rating-container {
        padding: 20px 15px;
    }
}

/* Custom Scrollbar for Modal */
.review-modal::-webkit-scrollbar {
    width: 6px;
}

.review-modal::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.review-modal::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.review-modal::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
