/* Favorite Folder Selection Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Ensure overlay sits above swatch cart icon (which is z-index:11000) */
    z-index: 12000;
    display: none;
}

.favorite-modal {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    /* Keep modal above overlay */
    z-index: 12001;
    max-height: 90vh;
    overflow-y: auto;
    display: none;
}

/* Desktop */
@media (min-width: 768px) {
    .favorite-modal {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: 350px;
        max-width: 400px;
        padding: 25px;
    }
}

/* Mobile & Tablet */
@media (max-width: 767px) {
    .favorite-modal {
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        border-radius: 12px 12px 0 0;
        padding: 20px;
        animation: slideUp 0.3s ease-out;
    }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Modal Content Styling */
.favorite-modal p {
    margin: 0;
    line-height: 1.4;
    color: #333;
}

.favorite-modal .folder-selection {
    margin-bottom: 15px;
}

.favorite-modal .folder-selection p {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.favorite-modal select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.favorite-modal .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}

.favorite-modal .modal-actions button {
    min-width: 80px;
    padding: 8px 16px;
}

/* Mobile button adjustments */
@media (max-width: 767px) {
    .favorite-modal .quick-add,
    .favorite-modal .modal-actions {
        flex-direction: column;
    }
    
    .favorite-modal .modal-actions button {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Show modal classes */
.modal-overlay.show,
.favorite-modal.show {
    display: block;
}