/* Pinterest-style Favorites CSS */

.mm-favorites-page-wrapper {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.mm-favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.mm-favorites-page-title {
    font-size: 32px;
    font-weight: 600;
    color: #300123;
    margin: 0;
    flex: 1;
}

.mm-favorites-group-title {
    font-size: 28px;
    font-weight: 600;
    color: #300123;
    margin: 0;
}

.mm-favorites-add-group-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #a2885f;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
    margin-left: 20px;
}

.mm-favorites-add-group-btn:hover {
    background: #8b7451;
    transform: scale(1.05);
}

/* Breadcrumb */
.mm-favorites-breadcrumb {
    margin-bottom: 15px;
}

.mm-favorites-breadcrumb a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mm-favorites-breadcrumb a:hover {
    color: #300123;
}

.mm-favorites-group-meta {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

/* Groups Grid */
.mm-favorites-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 0;
}

.mm-favorites-group-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: white;
    position: relative;
}

.mm-favorites-group-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.mm-favorites-group-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.mm-favorites-group-thumbnail {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.mm-favorites-group-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mm-favorites-group-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    color: #999;
    font-size: 48px;
}

.mm-favorites-group-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mm-favorites-group-item:hover .mm-favorites-group-overlay {
    opacity: 1;
}

.mm-favorites-group-count {
    color: white;
    font-weight: 500;
    font-size: 14px;
}

.mm-favorites-group-info {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.mm-favorites-group-name {
    font-size: 16px;
    font-weight: 600;
    color: #300123;
    margin: 0;
    flex: 1;
    margin-right: 10px;
}

.mm-favorites-delete-group-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.mm-favorites-delete-group-btn:hover {
    color: #ff4757;
    background: #ffe0e0;
}

/* Ads Grid (when viewing specific group) */
.mm-favorites-ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 0;
}

.mm-favorites-ad-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: white;
}

.mm-favorites-ad-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.mm-favorites-ad-thumbnail {
    width: 100%;
    height: 180px;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.mm-favorites-ad-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mm-favorites-ad-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #999;
    font-size: 40px;
}

.mm-favorites-ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mm-favorites-ad-item:hover .mm-favorites-ad-overlay {
    opacity: 1;
}

.mm-favorites-view-btn,
.mm-favorites-remove-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    text-decoration: none;
}

.mm-favorites-view-btn {
    background: #300123;
}

.mm-favorites-remove-btn {
    background: #ff4757;
}

.mm-favorites-view-btn:hover,
.mm-favorites-remove-btn:hover {
    transform: scale(1.1);
}

.mm-favorites-ad-title {
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 500;
    color: #300123;
    line-height: 1.3;
}

/* Empty State */
.mm-favorites-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.mm-favorites-empty-state i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.mm-favorites-empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.mm-favorites-empty-state p {
    font-size: 16px;
    color: #666;
}

/* Modal Styles */
.mm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.mm-modal.show {
    display: flex !important;
}

.mm-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.mm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.mm-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #300123;
}

.mm-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.mm-modal-close:hover {
    color: #333;
    background: #f0f0f0;
}

.mm-modal-body {
    padding: 20px;
}

.mm-form-group {
    margin-bottom: 20px;
}

.mm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.mm-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.mm-form-group input:focus {
    outline: none;
    border-color: #a2885f;
    box-shadow: 0 0 0 2px rgba(162, 136, 95, 0.1);
}

.mm-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

.mm-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.mm-btn-primary {
    background: #a2885f;
    color: white;
}

.mm-btn-primary:hover {
    background: #8b7451;
}

.mm-btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.mm-btn-secondary:hover {
    background: #e0e0e0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mm-favorites-page-wrapper {
        padding: 15px;
    }

    .mm-favorites-groups-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .mm-favorites-ads-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .mm-favorites-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .mm-favorites-page-title {
        font-size: 24px;
    }

    .mm-modal-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .mm-favorites-groups-grid {
        grid-template-columns: 1fr;
    }

    .mm-favorites-ads-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .mm-favorites-page-title,
    .mm-favorites-group-title {
        font-size: 20px;
    }
}