/* ==========================================
   Watch-star button - canonical styles
   Used by _WatchStar.cshtml partial.
   Two modes:
     .watch-star--floating  : circular icon button overlaid on listing cards
     .watch-star--inline    : pill button with text label (for detail pages)
   ========================================== */

.watch-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1.5px solid rgba(0, 0, 0, 0.06);
    color: #5a6975;
    cursor: pointer;
    padding: 0;
    transition: transform 0.18s ease,
                background-color 0.18s ease,
                color 0.18s ease,
                box-shadow 0.18s ease,
                border-color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.watch-star:focus { outline: none; }
.watch-star:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 198, 55, 0.45),
                0 2px 6px rgba(0, 0, 0, 0.08);
}

.watch-star:hover {
    background: #ffffff;
    color: #ffc637;
    border-color: rgba(255, 198, 55, 0.45);
    transform: scale(1.06);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.watch-star.is-watching {
    background: #fff8e0;
    color: #ffc637;
    border-color: rgba(255, 198, 55, 0.55);
}

.watch-star.is-watching .watch-star__icon {
    fill: #ffc637;
    stroke: #ffc637;
    filter: drop-shadow(0 0 4px rgba(255, 198, 55, 0.45));
}

.watch-star.is-watching:hover {
    background: #fff;
    color: #d97706;
    border-color: #ffc637;
}

.watch-star.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.watch-star__icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

/* Pop animation on toggle */
.watch-star.pop .watch-star__icon {
    animation: watch-star-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes watch-star-pop {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.45); }
    65%  { transform: scale(0.85); }
    100% { transform: scale(1); }
}

/* ----- Floating mode: small circular button that floats to the right of the title row ----- */
.watch-star--floating {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    float: right;
    margin: -2px 0 0 8px;   /* nudge up slightly to align with title baseline */
    flex-shrink: 0;
}

.watch-star--floating .watch-star__icon {
    width: 16px;
    height: 16px;
}

/* ----- Corner mode: absolute top-right of an image / card with overflow:hidden parent ----- */
.watch-star--corner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.watch-star--corner .watch-star__icon {
    width: 17px;
    height: 17px;
}

/* ----- Inline mode: pill button with text label (for detail pages) ----- */
.watch-star--inline {
    height: 42px;
    padding: 0 18px;
    border-radius: 22px;
    gap: 8px;
}

.watch-star--inline .watch-star__icon {
    width: 17px;
    height: 17px;
}

.watch-star--inline .watch-star__label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* ----- Mobile tweaks ----- */
@media (max-width: 480px) {
    .watch-star--floating {
        width: 30px;
        height: 30px;
    }
    .watch-star--floating .watch-star__icon {
        width: 14px;
        height: 14px;
    }
    .watch-star--corner {
        width: 32px;
        height: 32px;
        top: 8px;
        right: 8px;
    }
    .watch-star--corner .watch-star__icon {
        width: 15px;
        height: 15px;
    }
    .watch-star--inline {
        height: 38px;
        padding: 0 14px;
    }
    .watch-star--inline .watch-star__label {
        font-size: 13px;
    }
}

/* ----- Dark mode ----- */
[data-theme="dark"] .watch-star {
    background: rgba(33, 45, 60, 0.92);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-secondary, #a8b2bc);
}
[data-theme="dark"] .watch-star:hover {
    background: rgba(45, 60, 78, 0.96);
    color: #ffc637;
    border-color: rgba(255, 198, 55, 0.45);
}
[data-theme="dark"] .watch-star.is-watching {
    background: rgba(255, 198, 55, 0.18);
    border-color: rgba(255, 198, 55, 0.55);
    color: #ffc637;
}
