/* File: static/css/favorites/favorites.css - CONSOLIDATED VERSION */

/* ==================================================
   CSS VARIABLES AND THEME
   ================================================== */
:root {
    --rose-quartz: #E6B7C1;
    --rose-quartz-dark: #d4a4b1;
    --soft-mauve: #a18da3;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ==================================================
   FAVORITES HEADER AND NAVIGATION
   ================================================== */
.favorites-header {
    background: linear-gradient(135deg, var(--rose-quartz) 0%, var(--soft-mauve) 100%);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
}

.favorites-header h2 {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.favorites-nav-pills .nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
}

.favorites-nav-pills .nav-link:hover,
.favorites-nav-pills .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
}

.favorites-nav-pills .nav-link i {
    opacity: 0.8;
}

/* ==================================================
   STATISTICS CARDS
   ================================================== */
.stats-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    height: 100%;
    border: 1px solid #e9ecef;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rose-quartz), var(--soft-mauve));
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.stats-card:hover::before {
    transform: scaleX(1);
}

.stats-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.stats-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--rose-quartz), var(--soft-mauve));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--rose-quartz);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stats-label {
    color: #6c757d;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* ==================================================
   FAVORITE BUTTONS
   ================================================== */
.favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    border: none;
    background: transparent;
    color: var(--soft-mauve);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    user-select: none;
    border-radius: var(--radius-md);
}

.favorite-btn:focus {
    outline: 2px solid var(--rose-quartz);
    outline-offset: 2px;
}

.favorite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.favorite-icon {
    transition: var(--transition-fast);
    font-size: 1.1em;
}

.favorite-btn:hover .favorite-icon {
    transform: scale(1.1);
}

.favorite-btn.favorited .favorite-icon {
    color: var(--rose-quartz);
    animation: heartbeat 0.6s ease-out;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    30% { transform: scale(1.25); }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.favorite-text {
    font-weight: 500;
    font-size: 0.9em;
    transition: var(--transition-fast);
}

.favorite-count {
    font-size: 0.8em;
    opacity: 0.7;
    font-weight: 400;
}

/* Header favorite button (compact) */
.header-favorite-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(161, 141, 163, 0.2);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    color: var(--soft-mauve);
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.header-favorite-btn:hover {
    border-color: var(--rose-quartz);
    color: var(--rose-quartz);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(230, 183, 193, 0.3);
}

.header-favorite-btn.favorited {
    background: var(--rose-quartz);
    border-color: var(--rose-quartz);
    color: white;
}

.header-favorite-btn.favorited:hover {
    background: var(--rose-quartz-dark);
    border-color: var(--rose-quartz-dark);
}

/* Image favorite button */
.image-favorite-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    color: white;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.image-favorite-btn:hover {
    background: rgba(230, 183, 193, 0.9);
    border-color: var(--rose-quartz);
    transform: scale(1.05);
}

.image-favorite-btn.favorited {
    background: var(--rose-quartz);
    border-color: var(--rose-quartz);
    color: white;
}

/* Footer favorite button (with text) */
.footer-favorite-btn {
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    border: 2px solid rgba(161, 141, 163, 0.2);
    background: white;
    color: var(--soft-mauve);
    font-weight: 600;
    min-width: 100px;
    gap: 0.5rem;
}

.footer-favorite-btn:hover {
    border-color: var(--rose-quartz);
    color: var(--rose-quartz);
    background: rgba(230, 183, 193, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.footer-favorite-btn.favorited {
    background: var(--rose-quartz);
    border-color: var(--rose-quartz);
    color: white;
}

.footer-favorite-btn.favorited:hover {
    background: var(--rose-quartz-dark);
    border-color: var(--rose-quartz-dark);
}

/* Loading state */
.favorite-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.favorite-btn.loading .favorite-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================================================
   FAVORITE CARDS
   ================================================== */
.favorite-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-smooth);
    height: 100%;
    position: relative;
}

.favorite-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(230, 183, 193, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.favorite-card:hover::before {
    left: 100%;
}

.favorite-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--rose-quartz);
}

.favorite-card .card-body {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
}

/* Stylist Cards */
.stylist-card .stylist-avatar {
    position: relative;
}

.stylist-card .stylist-avatar img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.stylist-card .avatar-placeholder {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--rose-quartz), var(--soft-mauve));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.stylist-badges .badge {
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

/* Service Cards */
.service-card .service-icon {
    width: 50px;
    height: 50px;
    background: rgba(230, 183, 193, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.service-details .badge {
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

/* Hairstyle Cards */
.hairstyle-card .card-image-container {
    position: relative;
    overflow: hidden;
}

.hairstyle-card .card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.hairstyle-card:hover .card-img-top {
    transform: scale(1.05);
}

.hairstyle-tags .badge {
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* ==================================================
   FAVORITE NOTES AND META
   ================================================== */
.favorite-notes {
    background: rgba(230, 183, 193, 0.1);
    border-left: 4px solid var(--rose-quartz);
    padding: 0.75rem;
    margin-top: 1rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: #6c757d;
    position: relative;
}

.favorite-notes::before {
    content: '"';
    position: absolute;
    left: 0.5rem;
    top: 0.25rem;
    font-size: 1.5rem;
    color: var(--rose-quartz);
    line-height: 1;
    opacity: 0.6;
}

.favorite-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* ==================================================
   PRIORITY BADGES
   ================================================== */
.priority-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-fast);
}

.priority-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.priority-badge:hover::before {
    left: 100%;
}

.priority-high {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.priority-medium {
    background: linear-gradient(135deg, #feca57, #ff9ff3);
    color: #2d3436;
}

.priority-low {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
}

/* ==================================================
   COLLECTIONS AND INSPIRATION BOARDS
   ================================================== */
.collections-section,
.inspiration-boards-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    height: 100%;
}

.collection-card,
.inspiration-board {
    background: linear-gradient(135deg, #fff 0%, #fafafa 100%);
    border: 2px solid #e9ecef;
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.collection-card::before,
.inspiration-board::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--rose-quartz), transparent);
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.collection-card:hover::before,
.inspiration-board:hover::before {
    transform: scaleX(1);
}

.collection-card:hover,
.inspiration-board:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--rose-quartz);
}

.collection-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* ==================================================
   SECTIONS AND LAYOUT
   ================================================== */
.favorites-section {
    margin-bottom: 3rem;
}

.section-title {
    color: #2d3436;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.section-title i {
    opacity: 0.8;
}

/* ==================================================
   EMPTY STATE
   ================================================== */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(230, 183, 193, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse-gentle 3s ease-in-out infinite;
    z-index: 0;
}

.empty-state > * {
    position: relative;
    z-index: 1;
}

@keyframes pulse-gentle {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 0.5; 
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.1); 
        opacity: 0.8; 
    }
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--rose-quartz);
    margin-bottom: 1.5rem;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-state h3 {
    color: #2d3436;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* ==================================================
   QUICK ACTIONS
   ================================================== */
.quick-actions-section {
    margin-top: 3rem;
}

.quick-actions-section .card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.quick-actions-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(230, 183, 193, 0.1) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

.quick-actions-section .card-body {
    position: relative;
    z-index: 1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================================================
   TOAST NOTIFICATIONS
   ================================================== */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: none;
}

.toast.bg-success {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
}

.toast.bg-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

.toast.bg-info {
    background: linear-gradient(135deg, var(--rose-quartz), var(--soft-mauve)) !important;
}

/* ==================================================
   RESPONSIVE DESIGN
   ================================================== */
@media (max-width: 1200px) {
    .stats-card {
        padding: 1.5rem;
    }
    
    .stats-number {
        font-size: 2rem;
    }
    
    .favorites-header {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .favorites-header {
        text-align: center;
        padding: 1rem;
    }
    
    .favorites-nav-pills {
        margin-top: 1rem;
    }
    
    .favorites-nav-pills .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .favorites-nav-pills .nav-link {
        margin: 0.25rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .stats-card {
        margin-bottom: 1rem;
        padding: 1.25rem;
    }
    
    .stats-number {
        font-size: 1.75rem;
    }
    
    .stats-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .favorite-card {
        margin-bottom: 1.5rem;
    }
    
    .favorite-card .card-body {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state::before {
        width: 150px;
        height: 150px;
    }
    
    .empty-state-icon {
        font-size: 3rem;
    }
    
    .header-favorite-btn {
        width: 36px;
        height: 36px;
    }
    
    .footer-favorite-btn {
        padding: 0.5rem 0.75rem;
        min-width: 90px;
        font-size: 0.85rem;
    }
    
    #toast-container {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
    }
    
    .toast {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .favorites-header h2 {
        font-size: 1.5rem;
    }
    
    .stats-number {
        font-size: 1.5rem;
    }
    
    .stats-label {
        font-size: 0.75rem;
    }
    
    .header-favorite-btn {
        width: 32px;
        height: 32px;
    }
    
    .footer-favorite-btn {
        padding: 0.45rem 0.65rem;
        font-size: 0.8rem;
        min-width: 80px;
    }
    
    .favorite-card .stylist-avatar img,
    .favorite-card .avatar-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .service-card .service-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ==================================================
   UTILITY CLASSES
   ================================================== */
.favorite-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.favorite-glow {
    box-shadow: 0 0 20px rgba(230, 183, 193, 0.5);
}

.favorite-bounce {
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-8px);
    }
    70% {
        transform: translateY(-4px);
    }
    90% {
        transform: translateY(-2px);
    }
}

/* ==================================================
   LOADING STATES
   ================================================== */
.favorite-card.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.favorite-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
}

.favorite-card.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--rose-quartz);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

/* ==================================================
   DARK MODE SUPPORT
   ================================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --rose-quartz: #E6B7C1;
        --rose-quartz-dark: #d4a4b1;
        --soft-mauve: #a18da3;
    }
    
    .stats-card,
    .favorite-card,
    .collections-section,
    .inspiration-boards-section {
        background: #2a2a2a;
        border-color: #444;
        color: #fff;
    }
    
    .collection-card,
    .inspiration-board {
        background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
        border-color: #444;
        color: #fff;
    }
    
    .empty-state {
        color: #ccc;
    }
    
    .section-title {
        color: #fff;
    }
    
    .header-favorite-btn {
        background: rgba(42, 42, 42, 0.9);
        border-color: rgba(161, 141, 163, 0.3);
    }
    
    .footer-favorite-btn {
        background: #2a2a2a;
        border-color: rgba(161, 141, 163, 0.3);
        color: var(--rose-quartz);
    }
    
    .footer-favorite-btn:hover {
        background: rgba(230, 183, 193, 0.1);
    }
}

/* ==================================================
   HIGH CONTRAST MODE SUPPORT
   ================================================== */
@media (prefers-contrast: high) {
    .favorite-btn {
        border: 2px solid currentColor;
    }
    
    .header-favorite-btn,
    .footer-favorite-btn {
        border-width: 3px;
    }
    
    .favorite-btn.favorited {
        border: 3px solid var(--rose-quartz);
    }
}

/* ==================================================
   REDUCED MOTION SUPPORT
   ================================================== */
@media (prefers-reduced-motion: reduce) {
    .favorite-btn,
    .favorite-icon,
    .favorite-text,
    .favorite-card,
    .stats-card,
    .collection-card,
    .inspiration-board {
        transition: none;
        animation: none;
    }
    
    .favorite-card:hover,
    .stats-card:hover,
    .collection-card:hover,
    .inspiration-board:hover {
        transform: none;
    }
    
    .favorite-btn:hover .favorite-icon {
        transform: none;
    }
    
    @keyframes heartbeat,
    @keyframes spin,
    @keyframes pulse-gentle,
    @keyframes float,
    @keyframes rotate,
    @keyframes bounce,
    @keyframes pulse {
        0%, 100% { transform: none; }
    }
}

/* ==================================================
   PRINT STYLES
   ================================================== */
@media print {
    .favorite-btn,
    #toast-container,
    .favorites-nav-pills,
    .quick-actions-section {
        display: none !important;
    }
    
    .favorite-card,
    .stats-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .favorites-header {
        background: #f8f9fa !important;
        color: #000 !important;
    }
}