/* Wishlist Page Styles */

.hrck-wishlist-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Loading state */
.hrck-wishlist-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.hrck-wishlist-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: var(--hrck-heart-color, #ff385c);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: hrck-spin 0.8s linear infinite;
}

@keyframes hrck-spin {
    to { transform: rotate(360deg); }
}

/* Empty state */
.hrck-wishlist-empty {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.hrck-wishlist-empty svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.hrck-wishlist-empty h3 {
    font-size: 20px;
    margin: 0 0 8px;
    color: #333;
}

.hrck-wishlist-empty p {
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto;
}

/* =========================================================================
   Title — editable by owner
   ========================================================================= */

.hrck-wishlist-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.hrck-wishlist-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: #222;
}

.hrck-title-editable .hrck-wishlist-title {
    cursor: pointer;
}

.hrck-title-edit-btn {
    opacity: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    padding: 6px;
    border-radius: 50%;
    transition: opacity 0.2s, color 0.2s, background 0.2s;
    flex-shrink: 0;
    line-height: 0;
}

.hrck-title-editable:hover .hrck-title-edit-btn {
    opacity: 1;
}

.hrck-title-edit-btn:hover {
    color: #555;
    background: #f0f0f0;
}

.hrck-wishlist-title-input,
.hrck-wishlist-title-input:focus,
.hrck-wishlist-title-input:active {
    font-size: 28px;
    font-weight: 700;
    color: #222;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0;
    background: transparent !important;
    font-family: inherit;
    width: 100%;
    max-width: 500px;
    caret-color: var(--hrck-heart-color, #ff385c);
    -webkit-appearance: none;
    border-radius: 0 !important;
}

/* =========================================================================
   Toolbar: pill buttons + share button
   ========================================================================= */

.hrck-wishlist-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.hrck-toolbar-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    color: #222;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.hrck-toolbar-pill:hover {
    border-color: #222;
}

/* Static dates pill (shared view — non-interactive) */
.hrck-toolbar-dates-static {
    cursor: default;
}

.hrck-toolbar-dates-static:hover {
    border-color: #ddd;
}

/* Share button — matches side panel flyout style */
.hrck-toolbar-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--hrck-heart-color, #ff385c);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.hrck-toolbar-share-btn:hover {
    opacity: 0.9;
}

.hrck-toolbar-share-btn svg {
    flex-shrink: 0;
}

/* Hide Explorer search bar and all secondary filter controls on wishlist page */
.hrck-wishlist-page .hfse-form-primary-fields,
.hrck-wishlist-page .hfse-form-secondary-fields {
    display: none !important;
}

/* Explorer cards: natural height — don't stretch to match tallest sibling */
.hrck-wishlist-page .hfse-property-container {
    align-self: start;
}

.hrck-wishlist-page .hfse-property-card {
    height: auto;
}

/* "Unavailable" overlay on cards with no availability for selected dates */
.hrck-wishlist-page .hfse-property-container {
    position: relative;
}

.hrck-unavailable-label {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
    letter-spacing: 0.02em;
    pointer-events: none;
}

.hrck-wishlist-page .hfse-property-container.hrck-unavailable .hfse-property-card {
    opacity: 0.55;
}

/* Property grid (shared view) */
.hrck-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Property card (shared view) */
.hrck-wishlist-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease;
}

.hrck-wishlist-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.hrck-wishlist-card-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%;
    overflow: hidden;
    background: #f0f0f0;
}

.hrck-wishlist-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hrck-wishlist-card-image .hrck-wishlist-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.hrck-wishlist-card-image .hrck-wishlist-remove-btn:hover {
    background: #fff;
    color: #333;
}

.hrck-wishlist-card-body {
    padding: 16px;
}

.hrck-wishlist-card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #333;
}

.hrck-wishlist-card-title a {
    color: inherit;
    text-decoration: none;
}

.hrck-wishlist-card-title a:hover {
    text-decoration: underline;
}

.hrck-wishlist-card-location {
    font-size: 13px;
    color: #666;
    margin: 0 0 8px;
}

.hrck-wishlist-card-details {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.hrck-wishlist-card-details span {
    white-space: nowrap;
}

.hrck-wishlist-card-price {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.hrck-wishlist-card-price .hrck-per-night {
    font-size: 13px;
    font-weight: 400;
    color: #666;
}

/* =========================================================================
   Interactions bar — Airbnb-style
   [Add note] .................... [thumbs-up] [thumbs-down]
   ========================================================================= */

.hrck-wishlist-interactions {
    background: #fff;
    border-top: 1px solid #ebebeb;
}

.hrck-interactions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}

/* "Add note" text button */
.hrck-add-note-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    color: #222;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 400;
    white-space: nowrap;
}

.hrck-add-note-btn:hover {
    border-color: #222;
}

/* Vote buttons */
.hrck-wishlist-voting {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 0;
    border: none;
}

.hrck-vote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s;
    color: #b0b0b0;
}

.hrck-vote-btn:hover {
    color: #222;
    background: #f5f5f5;
}

.hrck-vote-up.hrck-vote-active {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
}

.hrck-vote-down.hrck-vote-active {
    color: var(--hrck-heart-color, #ff385c);
    background: rgba(255, 56, 92, 0.06);
}

/* =========================================================================
   Inline notes (displayed under each card)
   ========================================================================= */

.hrck-inline-notes {
    padding: 0 12px 12px;
}

.hrck-inline-note {
    padding: 8px 0;
    border-top: 1px solid #f5f5f5;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hrck-inline-note:first-child {
    border-top: none;
}

.hrck-inline-note-header {
    display: flex;
    align-items: baseline;
    gap: 0;
    font-size: 13px;
    line-height: 1.4;
}

.hrck-inline-note-name {
    font-weight: 600;
    color: #222;
}

.hrck-inline-note-sep {
    color: #717171;
    margin: 0 2px;
}

.hrck-inline-note-time {
    color: #717171;
    font-weight: 400;
}

.hrck-inline-note-text {
    font-size: 14px;
    color: #484848;
    line-height: 1.45;
    margin-top: 2px;
}

/* Note enter animation */
.hrck-inline-note.hrck-note-enter {
    opacity: 0;
    transform: translateY(-8px);
}

/* =========================================================================
   Note modal — write-only, slide-up + fade
   ========================================================================= */

.hrck-note-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: background 0.25s ease;
}

.hrck-note-modal-overlay.hrck-modal-visible {
    background: rgba(0, 0, 0, 0.5);
}

.hrck-note-modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    width: 90%;
    max-width: 420px;
    position: relative;
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.hrck-modal-visible .hrck-note-modal {
    transform: translateY(0);
    opacity: 1;
}

.hrck-note-modal h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    color: #222;
    padding-right: 32px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hrck-note-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.hrck-note-modal-close:hover {
    background: #f0f0f0;
}

.hrck-note-modal-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hrck-note-modal-form input,
.hrck-note-modal-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.hrck-note-modal-form input:focus,
.hrck-note-modal-form textarea:focus {
    outline: none;
    border-color: #222;
}

.hrck-note-modal-form textarea {
    resize: vertical;
    min-height: 80px;
}

.hrck-note-modal-submit-btn {
    align-self: flex-end;
    padding: 10px 20px;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.hrck-note-modal-submit-btn:hover {
    background: #444;
}

.hrck-note-modal-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =========================================================================
   Share modal
   ========================================================================= */

.hrck-share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.hrck-share-modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 480px;
    position: relative;
}

.hrck-share-modal h3 {
    font-size: 20px;
    margin: 0 0 20px;
    color: #333;
}

.hrck-share-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.hrck-share-modal-close:hover {
    background: #f0f0f0;
}

.hrck-share-url-row,
.hrck-share-email-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.hrck-share-url-input,
.hrck-share-email-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.hrck-share-copy-btn,
.hrck-share-email-btn {
    padding: 10px 20px;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.hrck-share-copy-btn:hover,
.hrck-share-email-btn:hover {
    background: #444;
}

.hrck-share-email-status {
    font-size: 14px;
    color: #2e7d32;
    margin: 0;
}

/* Explorer embed wrapper */
.hrck-wishlist-explorer {
    margin-bottom: 24px;
}

/* =========================================================================
   Responsive: 960px breakpoint (matches HomeRunner)
   ========================================================================= */

@media (max-width: 960px) {
    .hrck-wishlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 16px;
    }

    .hrck-share-modal,
    .hrck-note-modal {
        width: 95%;
        padding: 24px;
    }

    .hrck-share-url-row,
    .hrck-share-email-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hrck-wishlist-grid {
        grid-template-columns: 1fr;
    }

    .hrck-wishlist-toolbar {
        gap: 6px;
    }

    .hrck-toolbar-pill {
        padding: 6px 14px;
        font-size: 13px;
    }

    .hrck-toolbar-share-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .hrck-wishlist-title-input {
        font-size: 22px;
    }
}
