/**
 * BuyingBuddy Custom Styles
 * Custom styling for BuyingBuddy widgets to match site design
 * Managed separately from theme manager to preserve custom branding
 */

/* ===== Header Section ===== */
/* Match the header background to our site's secondary color */
.mbb-brand-header-wrap {
    background-color: #000000 !important;
}

/* Ensure all text in header is white for contrast */
.mbb-brand-header-wrap,
.mbb-brand-header-wrap h2,
.mbb-brand-header-wrap .bfg-text,
.mbb-brand-header-wrap .bfg-text-title {
    color: #ffffff !important;
}

/* Style links in header */
.mbb-brand-header-wrap a {
    color: #ffffff !important;
    text-decoration: none !important;
}

.mbb-brand-header-wrap a:hover {
    color: #dfb98b !important;
}

/* Agent name button styling */
.mbb-brand-header-wrap .mbb-AgentName.btn {
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

.mbb-brand-header-wrap .mbb-AgentName.btn:hover {
    color: #dfb98b !important;
}

/* Phone number styling */
.mbb-brand-header-wrap .mbb-agent-phoneNumber a {
    color: #ffffff !important;
    font-weight: 600 !important;
}

.mbb-brand-header-wrap .mbb-agent-phoneNumber a:hover {
    color: #dfb98b !important;
}

/* Header title styling - match site fonts */
.mbb-brand-header-wrap h2.bfg-text-title {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}

/* Content wrapper padding */
.mbb-brand-header-wrap .bfg-content-wrapper {
    padding: 2rem 1.5rem !important;
}

/* Agent photo styling */
.mbb-brand-header-wrap .mbb-AgentPhoto img {
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Office logo styling */
.mbb-brand-header-wrap .mbb-AgentCompanyLogo img {
    max-width: 180px !important;
    height: auto !important;
    filter: brightness(0) invert(1) !important; /* Makes logo white if it's dark */
}

/* Icon styling */
.mbb-brand-header-wrap .fa-bb-phone-circle {
    color: #dfb98b !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mbb-brand-header-wrap .bfg-content-wrapper {
        padding: 1.5rem 1rem !important;
    }

    .mbb-brand-header-wrap h2.bfg-text-title {
        font-size: 1.5rem !important;
    }
}

/* ===== Additional Widget Styling ===== */

/* Ensure buttons match site style */
bb-widget button,
bb-widget .btn {
    border-radius: 4px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
}

/* Primary button colors */
bb-widget button.btn-primary,
bb-widget .btn-primary {
    background-color: #dfb98b !important;
    border-color: #dfb98b !important;
    color: #2b2520 !important;
}

bb-widget button.btn-primary:hover,
bb-widget .btn-primary:hover {
    background-color: #c9a071 !important;
    border-color: #c9a071 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Secondary button colors */
bb-widget button.btn-secondary,
bb-widget .btn-secondary {
    background-color: #000000 !important;
    border-color: #000000 !important;
    color: #ffffff !important;
}

bb-widget button.btn-secondary:hover,
bb-widget .btn-secondary:hover {
    background-color: #8b6f47 !important;
    border-color: #8b6f47 !important;
}

/* Property card styling */
bb-widget .property-card,
bb-widget .listing-item {
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

bb-widget .property-card:hover,
bb-widget .listing-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-5px) !important;
}

/* Price styling */
bb-widget .price,
bb-widget [class*="price"] {
    color: #8b6f47 !important;
    font-weight: 700 !important;
    font-family: 'Playfair Display', Georgia, serif !important;
}

/* Link styling */
bb-widget a:not(.btn) {
    color: #8b6f47 !important;
}

bb-widget a:not(.btn):hover {
    color: #dfb98b !important;
}

/* Form input styling */
bb-widget input[type="text"],
bb-widget input[type="email"],
bb-widget input[type="tel"],
bb-widget input[type="search"],
bb-widget select,
bb-widget textarea {
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    padding: 0.75rem !important;
}

bb-widget input:focus,
bb-widget select:focus,
bb-widget textarea:focus {
    border-color: #dfb98b !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(223, 185, 139, 0.2) !important;
}

/* ===== Search Form Layout ===== */
/* Override BuyingBuddy's 1200px max-width to allow full-width search form */
[id^="MBBv3"]:not(#mbbV1) mbb-results-header .mbb-form-search .mbb-form-search-wrap,
[id^="MBBv3"]:not(#mbbV1) .mbb-results-header .mbb-form-search .mbb-form-search-wrap,
.mbb-form-search-wrap {
    max-width: none !important;
}
