/**
 * Watchlist Component Styles
 * Using Automatic.css framework
 */

/* Watchlist Toggle Button */
.watchlist-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
    transition: all var(--trans-fast);
}

.watchlist-toggle:active {
    transform: scale(0.98);
}

/* Loading state */
.watchlist-toggle.is-loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Icon styling */
.watchlist-toggle__icon {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
}

/* Show/hide icons based on state */
.watchlist-toggle__icon--remove {
    display: none;
}

.watchlist-toggle.is-in-watchlist .watchlist-toggle__icon--add {
    display: none;
}

.watchlist-toggle.is-in-watchlist .watchlist-toggle__icon--remove {
    display: block;
}

/* Mobile responsive - icon only on small screens */
@media (max-width: 767px) {
    .watchlist-toggle__text {
        display: none;
    }
    
    .watchlist-toggle {
        padding: var(--space-s);
    }
}

/* Notification styles */
.watchlist-notification {
    position: fixed;
    bottom: var(--space-l);
    right: var(--space-l);
    padding: var(--space-m) var(--space-l);
    border-radius: var(--radius-m);
    background-color: var(--white);
    color: var(--text);
    box-shadow: var(--shadow-l);
    font-family: var(--body-font);
    font-size: var(--text-s);
    font-weight: 500;
    opacity: 0;
    transform: translateY(1rem);
    transition: all var(--trans-fast);
    z-index: 9999;
}

.watchlist-notification.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.watchlist-notification--success {
    background-color: var(--green);
    color: var(--white);
}

.watchlist-notification--error {
    background-color: var(--red);
    color: var(--white);
}

/* Mobile responsive notifications */
@media (max-width: 767px) {
    .watchlist-notification {
        left: var(--space-m);
        right: var(--space-m);
        bottom: var(--space-m);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .watchlist-toggle {
        background-color: var(--black);
        border-color: var(--border-dark);
        color: var(--text-dark);
    }
    
    .watchlist-toggle:hover {
        background-color: var(--shade-dark);
        border-color: var(--border-darker);
    }
    
    .watchlist-notification {
        background-color: var(--black);
        color: var(--text-dark);
    }
}