/**
 * Morocco Tours Engine - Wishlist System CSS
 * Modern, responsive wishlist styling that works across all devices
 */

/* ====================================================
   Wishlist Button Base Styles
   ==================================================== */

.mte-wishlist-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #ff5a5f;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    z-index: 10;
    appearance: none;
    -webkit-appearance: none;
}

.mte-wishlist-btn i {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #ff5a5f;
    transition: all 0.3s ease;
}

/* Hover States */
.mte-wishlist-btn:hover {
    background: #ffffff;
    border-color: rgba(255, 90, 95, 0.3);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 25px rgba(255, 90, 95, 0.15);
}

.mte-wishlist-btn:hover i {
    color: #e74c3c;
    transform: scale(1.1);
}

/* Active States */
.mte-wishlist-btn.active {
    background: #ffffff;
    border-color: rgba(255, 90, 95, 0.4);
    color: #ff5a5f;
    animation: heartBeat 0.6s ease-in-out;
}

.mte-wishlist-btn.active i {
    color: #ff5a5f;
    transform: scale(1.2);
}

.mte-wishlist-btn.active:hover {
    background: #f8f9fa;
    transform: scale(1.05) rotate(0deg);
    box-shadow: 0 8px 30px rgba(255, 90, 95, 0.25);
}

.mte-wishlist-btn.active:hover i {
    color: #e74c3c;
}

/* Loading State */
.mte-wishlist-btn.loading {
    pointer-events: none;
    opacity: 0.7 !important;
    opacity: 0.7;
}

.mte-wishlist-btn.loading i {
    animation: spin 1s linear infinite;
}

/* Disabled State */
.mte-wishlist-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ====================================================
   Position Variants
   ==================================================== */

/* Top-right corner (default for cards) */
.mte-wishlist-btn--top-right {
    position: absolute;
    top: 12px;
    right: 12px;
}

/* Inline button */
.mte-wishlist-btn--inline {
    position: relative;
    width: auto;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
}

.mte-wishlist-btn--inline i {
    margin-right: 6px;
}

/* ====================================================
   Animations
   ==================================================== */

@keyframes heartBeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.3); }
    30% { transform: scale(1); }
    45% { transform: scale(1.2); }
    60% { transform: scale(1); }
    100% { transform: scale(1); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ====================================================
   Notification System
   ==================================================== */

.mte-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 350px;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mte-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.mte-notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.mte-notification-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.mte-notification-close:hover {
    opacity: 1;
}

.mte-notification-link {
    color: #ff5a5f;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.mte-notification-link:hover {
    text-decoration: underline;
}

/* Notification Types */
.mte-notification-success {
    border-left: 4px solid #2ecc71;
}

.mte-notification-info {
    border-left: 4px solid #3498db;
}

.mte-notification-warning {
    border-left: 4px solid #f39c12;
}

.mte-notification-error {
    border-left: 4px solid #e74c3c;
}

/* ====================================================
   Wishlist Page Styles
   ==================================================== */

.mte-wishlist-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.mte-wishlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f5;
}

.mte-wishlist-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.mte-wishlist-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.mte-wishlist-count {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

.mte-wishlist-clear {
    padding: 8px 16px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mte-wishlist-clear:hover {
    background: #d32f2f;
}

/* Wishlist Items Grid */
.mte-wishlist-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Empty State */
.mte-wishlist-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.mte-wishlist-empty-icon {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.mte-wishlist-empty-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.mte-wishlist-empty-text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.mte-wishlist-empty-action {
    display: inline-block;
    padding: 12px 24px;
    background: #ff5a5f;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.mte-wishlist-empty-action:hover {
    background: #ff3838;
}

/* ====================================================
   Mobile Responsive
   ==================================================== */

@media (max-width: 768px) {
    /* Mobile Notifications */
    .mte-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    /* Mobile Wishlist Page */
    .mte-wishlist-page {
        padding: 15px;
    }
    
    .mte-wishlist-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .mte-wishlist-title {
        font-size: 24px;
    }
    
    .mte-wishlist-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Mobile Grid */
    .mte-wishlist-items {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }
    
    /* Mobile Buttons */
    .mte-wishlist-btn {
        width: 40px;
        height: 40px;
    }
    
    .mte-wishlist-btn i {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }
    
    .mte-wishlist-btn--inline {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    /* Small Mobile */
    .mte-wishlist-items {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .mte-wishlist-empty {
        padding: 40px 15px;
    }
    
    .mte-wishlist-empty-icon {
        font-size: 48px;
    }
    
    .mte-wishlist-empty-title {
        font-size: 20px;
    }
    
    .mte-wishlist-empty-text {
        font-size: 14px;
    }
}

/* ====================================================
   High Contrast & Accessibility
   ==================================================== */

@media (prefers-reduced-motion: reduce) {
    .mte-wishlist-btn,
    .mte-wishlist-btn i,
    .mte-notification {
        transition: none;
        animation: none;
    }
    
    .mte-wishlist-btn:hover {
        transform: none;
    }
}

@media (prefers-contrast: high) {
    .mte-wishlist-btn {
        border-color: #000;
        background: #fff;
        color: #000;
    }
    
    .mte-wishlist-btn.active {
        background: #000;
        color: #fff;
    }
}

/* Focus States */
.mte-wishlist-btn:focus,
.mte-wishlist-btn:focus-visible {
    outline: 2px solid #ff5a5f;
    outline-offset: 2px;
}

.mte-wishlist-clear:focus,
.mte-wishlist-clear:focus-visible {
    outline: 2px solid #ff5a5f;
    outline-offset: 2px;
}

/* ====================================================
   Print Styles
   ==================================================== */

@media print {
    .mte-wishlist-btn,
    .mte-notification,
    .mte-wishlist-actions {
        display: none !important;
    }
    
    .mte-wishlist-page {
        max-width: none;
        padding: 0;
    }
}
