/* ###########################################################
   ###   2418521        Antony O'Neill                     ###
   ###   TEMPUS PRIVÉ - PRIVATE COLLECTION STYLING MODULE  ###
   ###   Last Updated: 02-07-2025                          ###
   ########################################################### */

/*
===============================================
Styling for wishlist modal and collection management UI
Animations and visual feedback for saved timepieces
===============================================
*/

/* ###########################################################
   ###   1. SVG HEART BUTTON                               ###
   ########################################################### */

/* ===== SVG HEART BUTTON ===== */
.btn-add-collection {
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0;
}

.btn-add-collection svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Default state - transparent/outline */
.btn-add-collection:not(.in-collection) svg {
    stroke: rgba(255, 255, 255, 0.8);
    fill: transparent;
}

.btn-add-collection:not(.in-collection):hover svg {
    stroke: var(--imperial-gold);
    fill: rgba(212, 175, 55, 0.1);
    transform: scale(1.1);
}

/* In collection state - filled gold */
.btn-add-collection.in-collection svg {
    stroke: var(--imperial-gold);
    fill: var(--imperial-gold);
}

.btn-add-collection.in-collection:hover svg {
    stroke: #F5E06B;
    fill: #F5E06B;
    transform: scale(0.9);
}

/* Focus state */
.btn-add-collection:focus-visible {
    outline: 2px solid var(--imperial-gold);
    outline-offset: 2px;
}

/* ###########################################################
   ###   2. HEART ANIMATIONS                               ###
   ########################################################### */

/* ===== HEART ANIMATION ===== */
@keyframes heart-pop {
    0%   { transform: scale(1); }
    15%  { transform: scale(1.3); }
    30%  { transform: scale(0.9); }
    45%  { transform: scale(1.15); }
    60%  { transform: scale(0.95); }
    75%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-add-collection.heart-pop svg {
    animation: heart-pop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Heart glow effect when adding */
@keyframes heart-glow {
    0%, 100% { filter: drop-shadow(0 0 0 transparent); }
    50%      { filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.8)); }
}

.btn-add-collection.heart-pop.in-collection svg {
    animation: heart-pop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55),
               heart-glow 0.6s ease;
}

/* ###########################################################
   ###   3. COLLECTION MODAL                               ###
   ########################################################### */

/* ===== COLLECTION MODAL ===== */
.collection-modal-content {
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
}

.collection-header {
    text-align: center;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--imperial-gold);
    padding-bottom: 2rem;
}

.collection-header h3 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--crown-navy);
    margin-bottom: 0.75rem;
    font-weight: 300;
    letter-spacing: -0.02em;
}

.collection-header p {
    color: var(--medium-gray);
    font-size: 1.125rem;
    font-style: italic;
}

/* ###########################################################
   ###   4. COLLECTION LIST LAYOUT                         ###
   ########################################################### */

/* ===== COLLECTION LIST LAYOUT ===== */
.collection-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
    padding: 0.5rem;
}

/* ###########################################################
   ###   5. COLLECTION ITEM STYLING                        ###
   ########################################################### */

.collection-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #fafafa;
    transition: all 0.3s ease;
    min-height: 100px;
}

.collection-item:hover {
    border-color: var(--imperial-gold);
    background: white;
    box-shadow: var(--shadow-luxury);
}

/* ###########################################################
   ###   6. PRODUCT IMAGE & BRAND LOGO                     ###
   ########################################################### */

.collection-item-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    padding: 8px;
    border: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.collection-item-brand-logo {
    width: 60px;
    height: 40px;
    object-fit: contain;
    opacity: 0.7;
    flex-shrink: 0;
}

/* ###########################################################
   ###   7. PRODUCT INFO                                   ###
   ########################################################### */

.collection-item-info {
    flex: 1;
    min-width: 0;
}

.collection-item-brand {
    font-size: 0.875rem;
    color: var(--imperial-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.collection-item-name {
    font-size: 1.125rem;
    color: var(--crown-navy);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.collection-item-price {
    font-size: 1rem;
    color: #666;
}

/* ###########################################################
   ###   8. REMOVE BUTTON                                  ###
   ########################################################### */

.btn-remove {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-remove:hover {
    background: #dc3545;
    border-color: #dc3545;
    transform: rotate(90deg);
}

.btn-remove:hover svg {
    stroke: white;
}

.btn-remove svg {
    width: 16px;
    height: 16px;
    stroke: #666;
}

/* ###########################################################
   ###   9. EMPTY STATE                                    ###
   ########################################################### */

.collection-items .empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--medium-gray);
}

.collection-items .empty-icon {
    margin-bottom: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-radius: 50%;
    position: relative;
}

.collection-items .empty-icon svg {
    width: 50px;
    height: 50px;
    stroke: var(--imperial-gold);
    opacity: 0.6;
}

.collection-items .empty-state h3 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--crown-navy);
    font-weight: 300;
}

.collection-items .empty-state p {
    margin-bottom: 2.5rem;
    font-size: 1.125rem;
    color: var(--medium-gray);
}

/* ###########################################################
   ###   10. RESPONSIVE DESIGN                             ###
   ########################################################### */

@media (max-width: 768px) {
    .collection-modal-content {
        max-width: 100%;
        margin: 1rem;
    }

    .collection-header h3 {
        font-size: 2rem;
    }

    .collection-item {
        padding: 1rem;
        gap: 1rem;
    }

    .collection-item-images {
        flex-direction: column;
        gap: 0.5rem;
    }

    .collection-item-image {
        width: 70px;
        height: 70px;
    }

    .collection-item-brand-logo {
        width: 40px;
        height: 24px;
    }

    .collection-item-name {
        font-size: 1.125rem;
    }

    .btn-remove {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .btn-add-collection {
        width: 40px;
        height: 40px;
    }

    .btn-add-collection svg {
        width: 20px;
        height: 20px;
    }

    .collection-item {
        flex-direction: column;
        text-align: center;
    }

    .collection-item-images {
        flex-direction: row;
    }

    .collection-item-info {
        width: 100%;
    }

    .btn-remove {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        width: 36px;
        height: 36px;
    }
}

/* ###########################################################
   ###   11. HIGH CONTRAST MODE                            ###
   ########################################################### */

@media (prefers-contrast: high) {
    .btn-add-collection:not(.in-collection) svg {
        stroke: white;
        stroke-width: 2.5;
    }

    .btn-add-collection.in-collection svg {
        fill: var(--imperial-gold);
        stroke: var(--crown-navy);
        stroke-width: 2.5;
    }
}

/* ###########################################################
   ###   12. REDUCED MOTION SUPPORT                         ###
   ########################################################### */

@media (prefers-reduced-motion: reduce) {
    .btn-add-collection,
    .btn-add-collection svg,
    .collection-item,
    .btn-remove,
    .collection-item-brand-logo {
        transition: none !important;
        animation: none !important;
    }

    .btn-remove:hover {
        transform: none;
    }
}

/* ###########################################################
   ###            END OF PRIVATE COLLECTION STYLES         ###
   ########################################################### */