/* ============================================================================
   SR Directory Listings — Frontend Styles
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. "Directory Listing" Badge on Listing Cards
   ---------------------------------------------------------------------------- */

/* 
 * The badge is rendered by existing item-labels.php using the property_label 
 * taxonomy term "Directory Listing". We target it via its term-specific class.
 * The exact class will be: label-color-{TERM_ID}
 * Since we don't know the term ID ahead of time, we use the slug-based approach.
 */

/* Generic Directory Listing badge styling — override via item-labels.php */
.sr-directory-badge,
.labels-wrap a.hz-label[href*="directory-listing"] {
    background-color: #8B8B8B !important;
    color: #FFFFFF !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    border-radius: 50px !important;
    padding: 4px 10px !important;
    letter-spacing: 0.3px;
    position: relative;
}

/* Tooltip on hover */
.labels-wrap a.hz-label[href*="directory-listing"]:hover::after {
    content: 'This listing is from our salon directory. The owner has not yet listed on SalonRenter.';
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    white-space: normal;
    width: 250px;
    line-height: 1.4;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.labels-wrap a.hz-label[href*="directory-listing"]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    z-index: 101;
}


/* ----------------------------------------------------------------------------
   2. Directory Listing Card Modifications (search results)
   ---------------------------------------------------------------------------- */

/* Muted card style for directory listings */
.sr-directory-listing-card .item-wrap {
    opacity: 0.95;
}

/* Add "Directory" indicator before the title */
.sr-directory-listing-card .item-body .item-title::before {
    content: '📁';
    margin-right: 6px;
    font-size: 14px;
}

/* Claim link on listing cards */
.sr-card-claim-link {
    display: inline-block;
    font-size: 12px;
    color: #F8A51A;
    font-weight: 600;
    margin-top: 6px;
    text-decoration: none;
}

.sr-card-claim-link:hover {
    color: #000;
    text-decoration: underline;
}


/* ----------------------------------------------------------------------------
   3. Single Property Page — Directory Listing Overrides
   ---------------------------------------------------------------------------- */

/* Hide agent contact info on directory listings */
body.sr-directory-listing .agent-details,
body.sr-directory-listing .agent-information,
body.sr-directory-listing .agent-image,
body.sr-directory-listing .agent-name,
body.sr-directory-listing .agent-phone-wrap,
body.sr-directory-listing .agent-social-media,
body.sr-directory-listing .property-form-wrap,
body.sr-directory-listing .sidebar-wrap .property-form,
body.sr-directory-listing #sidebar .btn_div,
body.sr-directory-listing .mobile-property-contact .contact-owner,
body.sr-directory-listing .mobile-property-contact .btn-secondary-outlined,
body.sr-directory-listing .contact-callout {
    display: none !important;
}

/* Ensure the schedule tour section is also hidden for directory listings */
body.sr-directory-listing .property-schedule-tour-wrap {
    display: none !important;
}


/* ----------------------------------------------------------------------------
   4. Directory Banner (top of detail page)
   ---------------------------------------------------------------------------- */

.sr-directory-banner {
    background: linear-gradient(135deg, #f5f5f5 0%, #ebebeb 100%);
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: block !important;
}

.sr-directory-banner-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.sr-directory-banner-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sr-directory-banner-text {
    flex: 1;
    min-width: 200px;
}

.sr-directory-banner-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.sr-directory-banner-text span {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.sr-directory-banner-btn {
    flex-shrink: 0;
    background-color: #F8A51A;
    color: #000 !important;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 18px;
    border-radius: 38px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.sr-directory-banner-btn:hover {
    background-color: #000;
    color: #fff !important;
}

@media (max-width: 768px) {
    .sr-directory-banner-inner {
        flex-direction: column;
        text-align: center;
    }
    .sr-directory-banner-btn {
        width: 100%;
        text-align: center;
    }
}


/* ----------------------------------------------------------------------------
   5. Lead Capture Form (replaces agent contact form on directory listings)
   ---------------------------------------------------------------------------- */

.sr-directory-lead-form {
    background: #FFFBF4;
    border: 1px solid #FFE6B9;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    display: block !important;
}

.sr-directory-lead-form h4 {
    font-size: 22px;
    font-weight: 700;
    color: #000;
    margin: 0 0 6px;
}

.sr-lead-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.sr-form-group {
    margin-bottom: 14px;
}

.sr-form-input {
    width: 100%;
    padding: 12px 18px;
    border: 1px solid #FFE3B3;
    border-radius: 44px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.sr-form-input:focus {
    border-color: #F8A51A;
    box-shadow: 0 0 0 3px rgba(248, 165, 26, 0.1);
}

textarea.sr-form-input {
    border-radius: 16px;
    resize: vertical;
}

.sr-lead-submit-btn {
    background-color: #FFDB9A;
    color: #000;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 30px;
    border: none;
    border-radius: 44px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.sr-lead-submit-btn:hover {
    background-color: #000;
    color: #fff;
}

.sr-lead-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sr-lead-form-message {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
}

.sr-lead-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sr-lead-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/* ----------------------------------------------------------------------------
   6. Claim This Listing Section
   ---------------------------------------------------------------------------- */

.sr-claim-section {
    background: #f0f8ff;
    border: 2px dashed #4a90d9;
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    text-align: center;
    display: block !important;
}

.sr-claim-inner h4 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px;
}

.sr-claim-inner p {
    font-size: 14px;
    color: #555;
    max-width: 500px;
    margin: 0 auto 20px;
    line-height: 1.5;
}

.sr-claim-btn {
    background-color: #F8A51A;
    color: #000;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 32px;
    border: none;
    border-radius: 44px;
    cursor: pointer;
    transition: all 0.2s;
}

.sr-claim-btn:hover {
    background-color: #000;
    color: #fff;
}

.sr-claim-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sr-claim-pending-notice {
    color: #856404;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 600;
}

.sr-claim-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.sr-claim-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sr-claim-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/* ----------------------------------------------------------------------------
   7. Dashboard — Claimed-but-free owner lead preview
   ---------------------------------------------------------------------------- */

.sr-leads-dashboard {
    padding: 20px;
}

.sr-leads-dashboard .sr-lead-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.sr-lead-card .sr-lead-info {
    flex: 1;
    min-width: 200px;
}

.sr-lead-card .sr-lead-name {
    font-weight: 700;
    font-size: 16px;
    color: #000;
}

.sr-lead-card .sr-lead-detail {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

.sr-lead-card .sr-lead-detail.unlocked {
    color: #333;
}

.sr-lead-card .sr-buy-lead-btn {
    background: #F8A51A;
    color: #000;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 20px;
    border: none;
    border-radius: 38px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.sr-lead-card .sr-buy-lead-btn:hover {
    background: #000;
    color: #fff;
}

.sr-lead-card .sr-lead-purchased {
    color: #28a745;
    font-weight: 700;
    font-size: 13px;
}

.sr-leads-summary {
    background: linear-gradient(135deg, #FFF7E8 0%, #FFF1D6 100%);
    border: 1px solid #FFE3B3;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.sr-leads-summary h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
}

.sr-leads-summary .sr-leads-count {
    font-size: 36px;
    font-weight: 800;
    color: #F8A51A;
}

.sr-leads-summary .sr-leads-cta {
    margin-top: 14px;
}

.sr-leads-summary .sr-upgrade-btn {
    background: #F8A51A;
    color: #000;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 28px;
    border: none;
    border-radius: 44px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.sr-leads-summary .sr-upgrade-btn:hover {
    background: #000;
    color: #fff;
}
