/* Reviews Section Styles */
.reviews-section {
    padding: 80px 20px;
    background-color: #f8f9fa;
    color: #333;
}

.reviews-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .reviews-container {
        grid-template-columns: 1fr;
    }
}

.review-form-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.review-form-box h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--secondary-color, #ff4500);
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
    margin-bottom: 20px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 30px;
    color: #444;
    cursor: pointer;
    transition: color 0.2s ease;
}

.star-rating label:hover,
.star-rating label:hover~label,
.star-rating input:checked~label {
    color: #FFD700;
}

.review-input-group {
    margin-bottom: 15px;
}

.review-input-group input,
.review-input-group textarea {
    width: 100%;
    padding: 12px;
    background: #fcfcfc;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    font-family: inherit;
}

.review-input-group input:focus,
.review-input-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color, #ff4500);
}

.review-input-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-review-btn {
    background-color: var(--secondary-color, #ff4500);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.submit-review-btn:hover {
    background-color: #e03e00;
}

/* Reviews Display */
.reviews-list-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.reviews-list-box::-webkit-scrollbar {
    width: 8px;
}

.reviews-list-box::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.reviews-list-box::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.review-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    position: relative;
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-author {
    font-weight: bold;
    font-size: 1.1em;
}

.review-date {
    font-size: 0.85em;
    color: #888;
}

.review-stars {
    color: #FFD700;
    margin-bottom: 10px;
}

.review-text {
    color: #555;
    line-height: 1.5;
}

.delete-review-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.8em;
    display: none;
}

.delete-review-btn:hover {
    background: #cc0000;
}

.owner-mode-active .delete-review-btn {
    display: block;
}

.owner-mode-active .review-date {
    margin-right: 60px;
    /* Make room for delete button */
}

/* iOS Lock Screen Notification Animation - Perfect Liquid Capsule */
.notification-anim {
    opacity: 0;
    /* Perfect 50px tall capsule in the center using exact math */
    -webkit-clip-path: inset(calc(50% - 25px) 15% calc(50% - 25px) 15% round 50px);
    clip-path: inset(calc(50% - 25px) 15% calc(50% - 25px) 15% round 50px);
    transform: translateY(30px) scale(0.95);

    transition: opacity 0.4s ease,
        -webkit-clip-path 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        clip-path 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    will-change: opacity, transform, clip-path, -webkit-clip-path;
}

.notification-anim.show {
    opacity: 1;
    /* Expand to full perfect rectangle */
    -webkit-clip-path: inset(0% 0% 0% 0% round 12px);
    clip-path: inset(0% 0% 0% 0% round 12px);
    transform: translateY(0) scale(1);
}

/* Inner content fades in perfectly synchronized */
.notification-anim>* {
    opacity: 0;
    transform: scale(0.95) translateY(5px);
    transition: opacity 0.4s ease 0.3s, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s;
}

.notification-anim.show>* {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Custom Animated Sort Dropdown */
.custom-sort-dropdown {
    position: relative;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: #003366;
    z-index: 100;
}

.sort-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sort-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.custom-sort-dropdown.open .sort-header i {
    transform: rotate(180deg);
}

.sort-options {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    min-width: 150px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: top right;
}

.custom-sort-dropdown.open .sort-options {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.sort-option {
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s ease, padding-left 0.2s ease;
}

.sort-option:hover {
    background: #f0f5fa;
    padding-left: 20px;
}

.sort-option.active {
    font-weight: 600;
    color: #0056b3;
    background: #e6f0ff;
}

/* Animated Success Popup */
.success-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.success-popup.show {
    opacity: 1;
    pointer-events: auto;
}

.success-popup .popup-content {
    background: white;
    padding: 40px 50px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.8) translateY(30px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-popup.show .popup-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.popup-content i {
    font-size: 70px;
    color: #4CAF50;
    margin-bottom: 15px;
}

.popup-content h4 {
    margin: 0 0 10px 0;
    color: #003366;
    font-size: 1.8rem;
    font-family: 'Outfit', sans-serif;
}

.popup-content p {
    margin: 0;
    color: #666;
    font-size: 1rem;
}