/* ==========================================================================
   Resales Online Connector - Wishlist Styles
   ========================================================================== */

/* Heart button on property cards */
.resales-wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 15;
    width: 36px;
    height: 36px;
    padding: 6px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    line-height: 1;
}

.resales-wishlist-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.resales-wishlist-btn:hover {
    background: #fff;
    color: #e74c3c;
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.resales-wishlist-btn.is-saved {
    color: #e74c3c;
    background: #fff;
}

/* Bounce animation on toggle */
@keyframes resales-heart-bounce {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.3); }
    50%  { transform: scale(0.9); }
    70%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.resales-heart-bounce {
    animation: resales-heart-bounce 0.4s ease;
}

/* Single property page heart — larger */
.resales-single-title-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.resales-single-title-row .resales-single-title {
    flex: 1;
}

.resales-wishlist-btn-single {
    position: relative;
    top: auto;
    right: auto;
    width: 44px;
    height: 44px;
    padding: 8px;
    flex-shrink: 0;
    margin-top: 2px;
}

.resales-wishlist-btn-single svg {
    width: 26px;
    height: 26px;
}

/* ==========================================================================
   Floating Action Button (FAB) — left side
   ========================================================================== */

.resales-wishlist-fab {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 99998;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--resales-secondary, #8b7355);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transition: all 0.3s ease;
    cursor: pointer;
}

.resales-wishlist-fab:hover {
    background: var(--resales-accent, #b8975a);
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.resales-fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.resales-fab-icon svg {
    width: 26px;
    height: 26px;
}

/* Badge counter */
.resales-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Hide badge when empty */
.resales-fab-empty .resales-fab-badge {
    display: none;
}

/* Pulse animation when item added */
@keyframes resales-fab-pulse {
    0%   { box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
    50%  { box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 0 0 12px rgba(139,115,85,0.2); }
    100% { box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 0 0 0 rgba(139,115,85,0); }
}

.resales-fab-pulse {
    animation: resales-fab-pulse 0.6s ease;
}

/* ==========================================================================
   Wishlist Page
   ========================================================================== */

#resales-wishlist-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--resales-text, #333);
}

/* Empty state */
.resales-wishlist-empty {
    text-align: center;
    padding: 80px 20px;
}

.resales-wishlist-empty-icon {
    color: var(--resales-border, #e5e2dc);
    margin-bottom: 20px;
}

.resales-wishlist-empty-icon svg {
    width: 64px;
    height: 64px;
}

.resales-wishlist-empty h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--resales-primary, #1a1a1a);
    margin: 0 0 10px;
}

.resales-wishlist-empty p {
    font-size: 15px;
    color: var(--resales-text-light, #777);
}

/* Tabs */
.resales-wishlist-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--resales-border, #e5e2dc);
}

.resales-wishlist-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 15px;
    font-weight: 600;
    color: var(--resales-text-light, #777);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resales-wishlist-tab:hover {
    color: var(--resales-primary, #1a1a1a);
}

.resales-wishlist-tab.active {
    color: var(--resales-secondary, #8b7355);
    border-bottom-color: var(--resales-secondary, #8b7355);
}

/* Sections */
.resales-wishlist-section {
    display: none;
}

.resales-wishlist-section.resales-wishlist-active {
    display: block;
}

.resales-wishlist-section-title {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 20px;
    color: var(--resales-primary, #1a1a1a);
}

/* Wishlist card — with remove button */
.resales-wishlist-card {
    position: relative;
}

.resales-wishlist-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 15;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.resales-wishlist-remove:hover {
    background: #e74c3c;
    transform: scale(1.1);
}

/* Action bar */
.resales-wishlist-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--resales-border, #e5e2dc);
}

.resales-btn-share {
    background: var(--resales-secondary, #8b7355);
    color: #fff;
    min-width: 160px;
}

.resales-btn-share:hover {
    background: var(--resales-accent, #b8975a);
}

.resales-btn-clear {
    background: #fff;
    color: var(--resales-text, #333);
    border: 1px solid var(--resales-border, #e5e2dc);
    min-width: 120px;
}

/* Two-column layout: cards left, contact sidebar right */
.resales-wishlist-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    align-items: start;
}

.resales-wishlist-main {
    min-width: 0; /* Prevent grid blowout */
}

/* Sticky sidebar — mirrors single property page style */
.resales-wishlist-sidebar {
    position: sticky;
    top: 30px;
}

.resales-wishlist-sidebar .resales-contact-card {
    background: var(--resales-white, #fff);
    border: 1px solid var(--resales-border, #e5e2dc);
    border-radius: 6px;
    padding: 24px;
}

.resales-wishlist-sidebar .resales-contact-card h3 {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px;
    color: var(--resales-primary, #1a1a1a);
}

.resales-wishlist-sidebar .resales-agent-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.resales-wishlist-sidebar .resales-agent-phone,
.resales-wishlist-sidebar .resales-agent-email {
    margin-bottom: 4px;
}

.resales-wishlist-sidebar .resales-agent-phone a,
.resales-wishlist-sidebar .resales-agent-email a {
    color: var(--resales-secondary, #8b7355);
    text-decoration: none;
    font-size: 14px;
}

.resales-wishlist-sidebar .resales-agent-phone a:hover,
.resales-wishlist-sidebar .resales-agent-email a:hover {
    text-decoration: underline;
}

.resales-wishlist-sidebar .resales-enquiry-form {
    margin-top: 16px;
}

.resales-wishlist-sidebar .resales-form-field {
    margin-bottom: 10px;
}

.resales-wishlist-sidebar .resales-form-field input,
.resales-wishlist-sidebar .resales-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--resales-border, #e5e2dc);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.resales-wishlist-sidebar .resales-form-field input:focus,
.resales-wishlist-sidebar .resales-form-field textarea:focus {
    outline: none;
    border-color: var(--resales-secondary, #8b7355);
}

.resales-wishlist-sidebar .resales-checkbox {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--resales-text-light, #777);
}

.resales-wishlist-sidebar .resales-btn-enquiry {
    width: 100%;
    padding: 12px;
    background: var(--resales-secondary, #8b7355);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s ease;
}

.resales-wishlist-sidebar .resales-btn-enquiry:hover {
    background: var(--resales-accent, #b8975a);
}

.resales-wishlist-sidebar .resales-whatsapp {
    margin-top: 10px;
}

.resales-wishlist-sidebar .resales-btn-whatsapp {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
}

.resales-wishlist-sidebar .resales-btn-whatsapp:hover {
    background: #1fba59;
    color: #fff;
}

.resales-wishlist-sidebar .resales-enquiry-message {
    margin-top: 10px;
    font-size: 13px;
}

.resales-wishlist-sidebar .resales-enquiry-message .success {
    color: #27ae60;
}

.resales-wishlist-sidebar .resales-enquiry-message .error {
    color: #e74c3c;
}

/* Wishlist grid: 2 columns to fit beside sidebar */
.resales-wishlist-main .resales-grid {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
    .resales-wishlist-layout {
        grid-template-columns: 1fr;
    }

    .resales-wishlist-sidebar {
        position: static;
    }

    .resales-wishlist-main .resales-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .resales-wishlist-main .resales-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .resales-wishlist-main .resales-grid {
        grid-template-columns: 1fr;
    }
}

.resales-btn-clear:hover {
    background: var(--resales-light, #f8f7f4);
    border-color: #e74c3c;
    color: #e74c3c;
}

/* ==========================================================================
   Share Modal
   ========================================================================== */

.resales-share-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.resales-share-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.resales-share-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}

.resales-share-dialog {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    width: 92%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 28px 24px;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.resales-share-modal.is-open .resales-share-dialog {
    transform: translateY(0) scale(1);
}

.resales-share-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #999;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.resales-share-close:hover {
    background: #f3f3f3;
    color: #333;
}

.resales-share-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
}

.resales-share-subtitle {
    margin: 0 0 24px;
    font-size: 13px;
    color: #888;
    text-align: center;
}

/* Channel grid */
.resales-share-channels {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.resales-share-channel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 6px;
    border-radius: 10px;
    background: #f7f7f8;
    border: 1px solid #ececec;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    cursor: pointer;
    --channel-color: #999;
}

.resales-share-channel:hover {
    background: var(--channel-color);
    color: #fff;
    border-color: var(--channel-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.resales-share-channel-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--channel-color);
    transition: color 0.2s ease;
}

.resales-share-channel:hover .resales-share-channel-icon {
    color: #fff;
}

.resales-share-channel-icon svg {
    width: 100%;
    height: 100%;
}

.resales-share-channel-label {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

/* Native share button */
.resales-share-native {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid #ececec;
    background: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
}

.resales-share-native:hover {
    background: #f7f7f8;
    color: #1a1a1a;
}

/* Copy link section */
.resales-share-link-wrap {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #ececec;
}

.resales-share-link-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
    background: #fafafa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", monospace;
}

.resales-share-link-input:focus {
    outline: none;
    border-color: var(--resales-secondary, #8b7355);
}

.resales-share-copy {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    background: var(--resales-secondary, #8b7355);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resales-share-copy:hover {
    background: var(--resales-accent, #b8975a);
}

.resales-share-copy.is-copied {
    background: #27ae60;
}

@media (max-width: 480px) {
    .resales-share-channels {
        grid-template-columns: repeat(3, 1fr);
    }

    .resales-share-dialog {
        padding: 28px 20px 20px;
    }

    .resales-share-title {
        font-size: 19px;
    }
}

/* ==========================================================================
   Toast notification
   ========================================================================== */

.resales-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--resales-primary, #1a1a1a);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    pointer-events: none;
    white-space: nowrap;
}

.resales-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .resales-wishlist-fab {
        width: 48px;
        height: 48px;
        left: 14px;
        bottom: 14px;
    }

    .resales-fab-icon svg {
        width: 22px;
        height: 22px;
    }

    .resales-wishlist-btn {
        width: 32px;
        height: 32px;
        padding: 5px;
    }

    .resales-wishlist-btn svg {
        width: 18px;
        height: 18px;
    }

    .resales-wishlist-tabs {
        overflow-x: auto;
    }

    .resales-wishlist-tab {
        padding: 10px 16px;
        font-size: 13px;
        white-space: nowrap;
    }

    .resales-wishlist-actions {
        flex-direction: column;
        align-items: center;
    }
}
