/* ==========================================================================
   MARE ACCOUNT HUB - PRO THEME REFINED (Modern CRM Style)
   ========================================================================== */

/* 0. FONT DECLARATIONS
   ========================================================================== */

/* 1. LAYOUT STRUCTURE & RESET
   ========================================================================== */
.mare-account-hub {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    min-height: 100vh;
    background-color: #f8fafc;
    font-family: 'Helvetica Neue', -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a202c;
}

/* Override Elementor padding only within the hub */
.mare-account-hub .elementor-widget-wrap.elementor-element-populated,
.elementor-widget-wrap.elementor-element-populated .mare-account-hub {
    padding: 0 !important;
}

.mare-account-hub .elementor-column-wrap,
.mare-account-hub .elementor-widget-container {
    padding: 0 !important;
}

/* Override specific Elementor column gap padding */
.elementor-column-gap-default > .elementor-column > .elementor-element-populated:has(.mare-account-hub),
.mare-account-hub .elementor-column-gap-default > .elementor-column > .elementor-element-populated,
.elementor-column-gap-default > .elementor-column:has(.mare-account-hub) > .elementor-element-populated {
    padding: 0 !important;
}

/* 2. SIDEBAR NAVIGATION
   ========================================================================== */
.mare-account-tabs.main-navs {
    width: 240px !important;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    overflow-y: auto;
    padding-top: 0;
    display: flex;
    flex-direction: column;
}

/* Logo at top of sidebar */
.mare-sidebar-logo {
    padding: 30px 20px 20px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 10px;
}

.mare-sidebar-logo img {
    max-width: 160px;
    height: auto;
    display: inline-block;
}

.mare-account-tabs ul.subnav {
    list-style: none;
    margin: 0;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.mare-account-tabs ul.subnav li { margin: 0; border: none; }

.mare-account-tabs ul.subnav li a {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mare-account-tabs ul.subnav li a:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.mare-account-tabs ul.subnav li.current a,
.mare-account-tabs ul.subnav li.selected a {
    background-color: #f1f5f9;
    color: #0f172a;
    font-weight: 600;
    margin-left: 20px;
    transition: all 0.2s ease;
}

.mare-account-logout {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid #e2e8f0;
}

.mare-account-logout .button {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff !important;
    color: #ef4444 !important;
    border: 1px solid #fee2e2 !important;
    padding: 10px;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.2s;
    box-shadow: none !important;
}

.mare-account-logout .button:hover {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
}

/* 3. MAIN CONTENT AREA
   ========================================================================== */
.mare-account-content {
    flex-grow: 1;
    margin-left: 240px;
    margin-top: 0;
    margin-right: 0;
    padding: 50px 20px;
    background-color: #f8fafc;
    min-height: 100vh;
    box-sizing: border-box;
}

.mare-tab-content {
    max-width: 1200px;
    margin: 0;
    display: none;
}

.mare-tab-content.active {
    display: block !important;
}

.mare-tab-content h2.screen-heading {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
    border-bottom: none;
    padding-bottom: 0;
}

/* 4. DASHBOARD COMPONENTS
   ========================================================================== */
.metanow-pro-dashboard-container {
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

.metanow-dashboard-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 6px;
}

.metanow-dashboard-subtitle {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 35px;
}

/* Stats Cards - Modern Gradient Design */
.metanow-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.metanow-stat-card {
    background: linear-gradient(135deg, #124574 0%, #0d2f4f 100%);
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(18, 69, 116, 0.15);
    display: flex;
    align-items: center;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.metanow-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.metanow-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(18, 69, 116, 0.25);
}

.metanow-stat-primary {
    background: linear-gradient(135deg, #124574 0%, #0d2f4f 100%);
}

.metanow-stat-success {
    background: linear-gradient(135deg, #124574 0%, #0d2f4f 100%);
}

.metanow-stat-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.metanow-stat-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.metanow-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
    color: #fff !important;
    font-size: 24px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.metanow-stat-primary .metanow-stat-icon,
.metanow-stat-success .metanow-stat-icon,
.metanow-stat-warning .metanow-stat-icon,
.metanow-stat-info .metanow-stat-icon {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

.metanow-stat-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.metanow-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 6px;
}

.metanow-stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Dashboard Widgets - Modern Design */
.metanow-dashboard-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
}

.metanow-dashboard-widget {
    background: #fff;
    padding: 0;
    border-radius: 16px;
    border: 1px solid #e8eaf6;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.3s ease;
}

.metanow-dashboard-widget:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: #124574;
}

.metanow-widget-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #124574 0%, #0d2f4f 100%);
    color: #fff;
    border-bottom: none;
}

.metanow-widget-content {
    padding: 20px 24px;
}

/* Quick Actions - Modern Button Design */
.metanow-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metanow-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metanow-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.metanow-action-btn:hover::before {
    left: 100%;
}

.metanow-action-primary {
    background: linear-gradient(135deg, #124574 0%, #0d2f4f 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(18, 69, 116, 0.3);
}

.metanow-action-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(18, 69, 116, 0.4);
}

.metanow-action-secondary {
    background: #f8f9fd !important;
    color: #124574 !important;
    border: 2px solid #e8eaf6 !important;
}

.metanow-action-secondary:hover {
    background: #fff !important;
    border-color: #124574 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 69, 116, 0.15);
}

/* Secondary Stats */
.secondary-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.secondary-stat {
    background: #fff;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #e8eaf6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    min-width: 200px;
}

.secondary-stat .label {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
}

.secondary-stat .value {
    color: #1e293b;
    font-size: 18px;
    font-weight: 700;
}

/* Message Items in Dashboard Widgets */
.metanow-message-item {
    padding: 16px;
    border-bottom: 1px solid #f0f1f7;
    transition: background 0.2s ease;
}

.metanow-message-item:hover {
    background: #f8f9fd;
}

.metanow-message-item:last-child {
    border-bottom: none;
}

.metanow-message-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
    color: #124574;
    font-weight: 600;
}

.metanow-message-excerpt {
    font-size: 14px;
    color: #5f6368;
    line-height: 1.5;
}

/* Additional Dashboard Elements */
.message-link,
.widget-footer-link {
    color: #124574;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    margin-top: 8px;
    transition: color 0.2s ease;
}

.message-link:hover,
.widget-footer-link:hover {
    color: #0d2f4f;
}

.empty-state {
    color: #94a3b8;
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
}

/* 5. MESSAGES STYLING (FIXED SCROLL & LAYOUT)
   ========================================================================== */
.mare-messages-container {
    display: grid !important;
    grid-template-columns: 300px 1fr !important;
    grid-template-rows: 100% !important;
    height: 700px !important; /* Fixed height for scrollability */
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

/* Threads Sidebar */
.mare-message-threads {
    border-right: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.mare-threads-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.mare-threads-list {
    flex-grow: 1;
    overflow-y: auto;
}

.mare-thread-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.1s;
}

.mare-thread-item:hover, .mare-thread-item.active {
    background: #f8fafc;
}

.mare-thread-item.mare-thread-has-unread {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding-left: 16px;
}

.mare-thread-item.mare-thread-has-unread .mare-thread-name {
    font-weight: 700;
    color: #0f4c8f;
}

.mare-thread-item.mare-thread-has-unread .mare-thread-preview {
    font-weight: 600;
    color: #1e293b;
}

.mare-thread-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.mare-unread-badge {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}

/* Message Viewer (Main Chat Area) */
.mare-message-viewer {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #fff;
}

.mare-viewer-content {
    display: flex !important;
    flex-direction: column !important; /* Force column layout */
    height: 100% !important;
    width: 100% !important;
}

.mare-viewer-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
}

/* Scrollable Messages Area */
.mare-messages-area {
    flex-grow: 1; /* Take up all available space */
    overflow-y: auto; /* Enable scrolling */
    padding: 24px;
    padding-bottom: 40px; /* Extra space at bottom */
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 0; /* Important for flex child scrolling */
}

/* Individual Message Items */
.mare-message-item {
    display: flex;
    flex-direction: column;
    max-width: 70%;
    margin-bottom: 8px;
    flex-shrink: 0; /* Don't shrink */
}

.mare-message-mine {
    align-self: flex-end;
    align-items: flex-end;
}

.mare-message-theirs {
    align-self: flex-start;
    align-items: flex-start;
}

/* Message Bubbles */
.mare-message-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.mare-message-mine .mare-message-bubble {
    background: #0f172a;
    color: #fff;
    border-bottom-right-radius: 2px;
}

.mare-message-theirs .mare-message-bubble {
    background: #fff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 2px;
}

.mare-message-meta {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    padding: 0 4px;
}

/* Unread Messages - Visual Distinction */
.mare-message-unread .mare-message-bubble {
    border-left: 4px solid #3b82f6;
    background: #eff6ff;
    font-weight: 500;
}

.mare-message-unread.mare-message-theirs .mare-message-bubble {
    background: #eff6ff;
    color: #1e293b;
    border: 1px solid #3b82f6;
    border-left: 4px solid #3b82f6;
}

.mare-message-unread.mare-message-mine .mare-message-bubble {
    background: #0f4c8f;
    color: #fff;
    border-left: 4px solid #60a5fa;
}

/* Reply/Input Area - Sticky Bottom */
.mare-reply-area {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0; /* Prevent shrinking */
    z-index: 10;
}

.mare-reply-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.mare-reply-form textarea {
    width: 100% !important;
    min-height: 80px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    resize: none;
    box-sizing: border-box;
    background: #f8fafc;
}

.mare-reply-form textarea:focus {
    outline: none;
    border-color: #94a3b8;
    background: #fff;
}

.mare-reply-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mare-attachment-wrapper {
    display: flex;
    align-items: center;
}

/* Specific button styling override */
.mare-attachment-label {
    background: #fff !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    margin: 0 !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.mare-attachment-label:hover {
    background: #f8fafc !important;
    color: #1e293b !important;
    border-color: #94a3b8 !important;
    transform: translateY(-1px);
}

.mare-send-btn {
    background: #0f172a !important;
    color: #fff !important;
    padding: 10px 24px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    border: none !important;
    cursor: pointer;
    margin-left: auto;
}

.mare-send-btn:hover {
    background: #334155 !important;
}

/* 6. SETTINGS & PROFILE
   ========================================================================== */
.metanow-settings-section {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 30px !important;
    margin-bottom: 30px !important;
}

.metanow-hp-field {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 10px 14px !important;
    width: 100%;
}

/* Profile Page - Company Card Styling */
.vendor-profile-header {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 30px !important;
    max-width: 280px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
}

.vendor-profile-header:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    border-color: #124574 !important;
}

/* Company Logo - Smaller Size */
.vendor-profile-header img {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid #fff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Vendor Name Smaller */
.vendor-profile-header h2 {
    margin: 0 0 8px 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
}

/* Rating Stars Smaller */
.vendor-profile-header .vendor-rating span {
    font-size: 14px !important;
}

.vendor-profile-header .vendor-rating > span:last-child {
    font-size: 13px !important;
}

/* Vendor ID Smaller */
.vendor-profile-header p {
    font-size: 12px !important;
}

/* Edit Profile Button - Move to Bottom of Card */
#tab-profile .mare-edit-profile-wrapper {
    margin-top: 15px !important;
    padding-top: 15px !important;
    border-top: 1px solid #e2e8f0 !important;
}

#tab-profile .button--primary,
#tab-profile .mare-tab-trigger {
    background: #124574 !important;
    color: #fff !important;
    border: 1px solid #124574 !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

#tab-profile .button--primary:hover,
#tab-profile .mare-tab-trigger:hover {
    background: #0d3a5c !important;
    border-color: #0d3a5c !important;
}

/* Update all primary/secondary colors to #124574 - SCOPED TO ACCOUNT HUB ONLY */
.mare-account-hub .button--primary,
.mare-account-hub .button.button--primary,
.mare-account-hub .hp-button--primary,
.mare-account-hub a.button--primary,
.mare-account-hub a.button.button--primary {
    background: #124574 !important;
    color: #fff !important;
    border: 1px solid #124574 !important;
}

.mare-account-hub .button--primary:hover,
.mare-account-hub .button.button--primary:hover,
.mare-account-hub .hp-button--primary:hover,
.mare-account-hub a.button--primary:hover,
.mare-account-hub a.button.button--primary:hover {
    background: #0d3a5c !important;
    border-color: #0d3a5c !important;
}

/* Secondary buttons with #124574 theme */
.mare-account-hub .button--secondary,
.mare-account-hub .button.button--secondary {
    background: #fff !important;
    color: #124574 !important;
    border: 2px solid #124574 !important;
}

.mare-account-hub .button--secondary:hover,
.mare-account-hub .button.button--secondary:hover {
    background: #f8fafc !important;
    color: #0d3a5c !important;
    border-color: #0d3a5c !important;
}

/* Regular buttons (non-primary/secondary) */
.mare-account-hub .button,
.mare-account-hub a.button {
    background: #fff !important;
    color: #333 !important;
    border: 1px solid #cbd5e1 !important;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.mare-account-hub .button:hover,
.mare-account-hub a.button:hover {
    background: #f8fafc !important;
    border-color: #124574 !important;
    color: #124574 !important;
}

/* Separators and borders with #124574 */
h3,
.vendor-description h3,
.vendor-listings-section h3,
.vendor-reputation h3,
#tab-settings h3,
#tab-listings h3,
#tab-favorites h3,
#tab-membership h3,
#tab-orders h3 {
    border-color: #124574 !important;
}

/* Links with #124574 color */
#tab-profile a,
#tab-listings a,
#tab-favorites a,
#tab-membership a,
#tab-orders a {
    color: #124574;
}

#tab-profile a:hover,
#tab-listings a:hover,
#tab-favorites a:hover,
#tab-membership a:hover,
#tab-orders a:hover {
    color: #0d3a5c;
}

/* Status badge colors - keep original functional colors but add #124574 for primary status */
.status-active,
.subscription-status-active {
    background: #124574 !important;
}

/* Form submit buttons */
button[type="submit"].button--primary,
input[type="submit"].button--primary {
    background: #124574 !important;
    color: #fff !important;
    border: 1px solid #124574 !important;
}

button[type="submit"].button--primary:hover,
input[type="submit"].button--primary:hover {
    background: #0d3a5c !important;
    border-color: #0d3a5c !important;
}

/* Tables - Order and Listing Tables */
.mare-listings-table a,
.shop_table_responsive a,
#tab-orders table a,
#tab-listings table a {
    color: #124574 !important;
    text-decoration: none;
}

.mare-listings-table a:hover,
.shop_table_responsive a:hover,
#tab-orders table a:hover,
#tab-listings table a:hover {
    color: #0d3a5c !important;
}

/* Active subscription status */
.subscription-item .status-active {
    background: #124574 !important;
}

/* Favorite items and cards */
.favorite-item a,
.listing-card a {
    color: #124574;
}

.favorite-item a:hover,
.listing-card a:hover {
    color: #0d3a5c;
}

/* HivePress specific buttons */
.hp-button.hp-button--primary {
    background: #124574 !important;
    border-color: #124574 !important;
}

.hp-button.hp-button--primary:hover {
    background: #0d3a5c !important;
    border-color: #0d3a5c !important;
}

/* Fix Favorites "View Details" button visibility */
#tab-favorites .button,
#tab-favorites a.button {
    background: #124574 !important;
    color: #fff !important;
    border: 1px solid #124574 !important;
}

#tab-favorites .button:hover,
#tab-favorites a.button:hover {
    background: #0d3a5c !important;
    border-color: #0d3a5c !important;
    color: #fff !important;
}

/* Fix Membership "Manage Subscription" button */
#tab-membership .button,
#tab-membership a.button {
    background: #124574 !important;
    color: #fff !important;
    border: 1px solid #124574 !important;
}

#tab-membership .button:hover,
#tab-membership a.button:hover {
    background: #0d3a5c !important;
    border-color: #0d3a5c !important;
    color: #fff !important;
}

/* Active membership status badge - blue color */
#tab-membership .subscription-item span[style*="background: #46b450"] {
    background: #124574 !important;
}

/* Orders page - Processing status badge */
#tab-orders span[style*="background: #ffba00"],
.shop_table_responsive span[style*="background: #ffba00"] {
    background: #124574 !important;
}

/* Settings page - File input button styling */
#tab-settings input[type="file"] {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 8px !important;
    width: 100% !important;
    max-width: 400px !important;
    font-size: 14px !important;
}

/* Style the file input button (Choose File) */
#tab-settings input[type="file"]::file-selector-button,
#tab-settings input[type="file"]::-webkit-file-upload-button {
    background: #124574 !important;
    color: #fff !important;
    border: 1px solid #124574 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    margin-right: 10px !important;
}

#tab-settings input[type="file"]::file-selector-button:hover,
#tab-settings input[type="file"]::-webkit-file-upload-button:hover {
    background: #0d3a5c !important;
    border-color: #0d3a5c !important;
}

/* Generic file input styling for all tabs */
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    background: #124574 !important;
    color: #fff !important;
    border: 1px solid #124574 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    margin-right: 10px !important;
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
    background: #0d3a5c !important;
    border-color: #0d3a5c !important;
}

/* HivePress file upload components */
.hp-form__file-button,
.hp-form__file-label {
    background: #124574 !important;
    color: #fff !important;
    border: 1px solid #124574 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.hp-form__file-button:hover,
.hp-form__file-label:hover {
    background: #0d3a5c !important;
    border-color: #0d3a5c !important;
}

/* ==========================================================================
   MOBILE HEADER & BURGER MENU COMPONENTS
   ========================================================================== */

.mare-mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    z-index: 999;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mare-burger-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.mare-burger-btn:hover {
    background: #f1f5f9;
}

.mare-burger-btn:focus {
    outline: 2px solid #124574;
    outline-offset: 2px;
}

.mare-burger-line {
    width: 24px;
    height: 3px;
    background-color: #1e293b;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-origin: center;
}

/* Burger to X animation */
.mare-burger-btn.active .mare-burger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mare-burger-btn.active .mare-burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mare-burger-btn.active .mare-burger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mare-mobile-logo {
    flex: 1;
    text-align: center;
}

.mare-mobile-logo img {
    max-height: 35px;
    width: auto;
}

.mare-mobile-badge {
    min-width: 22px;
    height: 22px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.mare-mobile-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 280px;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    pointer-events: none;
}

.mare-mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

body.mare-menu-open {
    overflow: hidden;
}

/* 7. RESPONSIVE - MOBILE HAMBURGER MENU
   ========================================================================== */
@media (max-width: 992px) {
    /* Show mobile header */
    .mare-mobile-header {
        display: flex !important;
    }

    .mare-mobile-overlay {
        display: block;
    }

    /* Account hub layout adjustments */
    .mare-account-hub {
        flex-direction: column !important;
        padding-top: 60px;
    }

    /* Transform sidebar to slide-in menu */
    .mare-account-tabs.main-navs {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 280px !important;
        height: 100vh !important;
        background: #fff;
        border-right: 1px solid #e2e8f0 !important;
        border-bottom: none !important;
        z-index: 1000;

        /* Hidden by default - slides in from left */
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);

        overflow-y: auto;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    }

    /* Menu open state */
    .mare-account-tabs.main-navs.menu-open {
        transform: translateX(0);
    }

    /* Sidebar logo styling */
    .mare-sidebar-logo {
        padding: 25px 20px 20px !important;
        border-bottom: 1px solid #e2e8f0;
        margin-bottom: 10px;
    }

    .mare-sidebar-logo img {
        max-width: 140px !important;
    }

    /* Menu items - VERTICAL layout (not horizontal) */
    .mare-account-tabs ul.subnav {
        flex-direction: column !important;
        overflow-x: visible !important;
        overflow-y: auto !important;
        padding: 12px !important;
        gap: 4px;
    }

    .mare-account-tabs ul.subnav li {
        width: 100%;
        flex-shrink: 0;
    }

    .mare-account-tabs ul.subnav li a {
        padding: 12px 14px;
        font-size: 15px;
        white-space: nowrap;
    }

    /* Active tab indicator */
    .mare-account-tabs ul.subnav li.current a,
    .mare-account-tabs ul.subnav li.selected a {
        margin-left: 0 !important;
        border-left: 3px solid #124574;
        padding-left: 11px;
    }

    /* Logout button stays at bottom */
    .mare-account-logout {
        margin-top: auto;
        padding: 20px;
        border-top: 1px solid #e2e8f0;
        position: sticky;
        bottom: 0;
        background: #fff;
    }

    /* Content area adjustments */
    .mare-account-content {
        margin-left: 0 !important;
        padding: 20px !important;
        width: 100%;
    }

    /* Messages container mobile adjustments */
    .mare-messages-container {
        grid-template-columns: 1fr !important;
        height: auto !important;
        min-height: 500px;
    }

    .mare-message-threads {
        display: none;
    }
}

/* Smaller mobile devices */
@media (max-width: 480px) {
    .mare-account-tabs.main-navs {
        width: 260px !important;
    }

    .mare-mobile-header {
        padding: 0 10px;
    }

    .mare-account-content {
        padding: 15px !important;
    }

    .mare-mobile-overlay {
        left: 260px !important;
    }
}

/* ==========================================================================
   NON-LOGGED-IN LOGIN MESSAGE STYLING
   ========================================================================== */

.mare-account-hub-login {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
    padding: 20px;
    font-family: 'Helvetica Neue', -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

.mare-account-hub-login > * {
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.mare-account-hub-login p {
    font-size: 18px;
    color: #1a202c;
    margin: 0 0 32px 0;
    line-height: 1.6;
    font-weight: 400;
}

.mare-account-hub-login a.hp-button,
.mare-account-hub-login a.hp-button--primary {
    display: inline-block;
    background: #124574 !important;
    color: #fff !important;
    border: 1px solid #124574 !important;
    padding: 12px 32px !important;
    font-size: 16px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.mare-account-hub-login a.hp-button:hover,
.mare-account-hub-login a.hp-button--primary:hover {
    background: #0d3a5c !important;
    border-color: #0d3a5c !important;
    box-shadow: 0 4px 12px rgba(18, 69, 116, 0.2) !important;
}

/* Responsive adjustments for login message */
@media (max-width: 768px) {
    .mare-account-hub-login {
        min-height: auto;
        padding: 40px 20px;
    }

    .mare-account-hub-login p {
        font-size: 16px;
        margin-bottom: 24px;
    }

    .mare-account-hub-login a.hp-button,
    .mare-account-hub-login a.hp-button--primary {
        padding: 10px 24px !important;
        font-size: 14px !important;
    }
}

/* Account Hub Notification Badge */
.mare-account-hub-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    padding: 0 3px;
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.4);
    z-index: 10;
}

/* Position relative on parent icon for badge to work */
.elementor-icon-list-item {
    position: relative;
}

/* ==========================================================================
   NEW PLACEHOLDER STYLES FOR SCENARIO 2 USERS (Paid but no vendor yet)
   ========================================================================== */

/* First Listing Notification */
.mare-first-listing-notice {
    background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
    border-left: 4px solid #124574;
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(18, 69, 116, 0.08);
}

.mare-first-listing-notice h3 {
    margin: 0 0 10px 0;
    color: #124574;
    font-size: 20px;
    font-weight: 600;
}

.mare-first-listing-notice p {
    margin: 0 0 20px 0;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

.mare-first-listing-notice .hp-button,
.mare-first-listing-notice a.button {
    background: #124574;
    color: #fff;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.mare-first-listing-notice .hp-button:hover,
.mare-first-listing-notice a.button:hover {
    background: #0d2f4f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 69, 116, 0.25);
}

/* Profile Tab Placeholder */
.mare-profile-placeholder {
    text-align: center;
    padding: 60px 40px;
    background: #f8f9fa;
    border-radius: 8px;
}

.mare-profile-placeholder div > div {
    margin-bottom: 30px;
}

.mare-profile-placeholder h3 {
    margin: 0 0 15px 0;
    color: #124574;
    font-size: 24px;
    font-weight: 600;
}

.mare-profile-placeholder p {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.mare-profile-placeholder a {
    background: #124574;
    color: #fff;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    display: inline-block;
    transition: all 0.3s ease;
}

.mare-profile-placeholder a:hover {
    background: #0d2f4f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 69, 116, 0.25);
}

/* Listings Tab Placeholder */
.mare-listings-placeholder {
    text-align: center;
    padding: 60px 40px;
    background: #f8f9fa;
    border-radius: 8px;
}

.mare-listings-placeholder h3 {
    margin: 0 0 15px 0;
    color: #124574;
    font-size: 24px;
    font-weight: 600;
}

.mare-listings-placeholder p {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.mare-listings-placeholder a {
    background: #124574;
    color: #fff;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    display: inline-block;
    transition: all 0.3s ease;
}

.mare-listings-placeholder a:hover {
    background: #0d2f4f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 69, 116, 0.25);
}
