/* 
 * White Theme & Modern Gradient Overrides
 */

/* 1. Page Backgrounds - Force white */
body, .ow_page_wrap, .ow_page_wrap_in, .ow_canvas, .ow_page, .ow_content {
    background-color: #ffffff !important;
    background-image: none !important;
}

/* 2. Header Area - FORCE WHITE (Fix for logo area) */
.ow_header {
    background-color: #ffffff !important;
    background-image: none !important;
    border-bottom: 1px solid #e1e1e1 !important;
}

/* 3. Inner Boxes - White */
.ow_box, .ow_box_empty {
    background-color: #ffffff !important;
    background-image: none !important;
    border: 1px solid #e1e1e1 !important;
}

/* 4. PURPLE GRADIENT BARS (original direction) */
.ow_site_menu, 
.ow_menu_wrap, 
.ow_main_menu, 
.ow_nav_wrap,
.ow_console,
.ow_content_menu_wrap,
.ow_content_menu,
.ow_box_cap,
.ow_box_cap_empty {
    /* Gradient: Deep Purple to Lighter Violet */
    background: linear-gradient(135deg, rgba(50, 20, 80, 0.92) 0%, rgba(90, 45, 120, 0.92) 100%) !important;
    background-color: #321450 !important; /* Fallback */
    border: none !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    
    /* Glass Effect */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Active Tabs */
.ow_content_menu li.active a {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-radius: 4px;
}

/* 5. TEXT COLORS - GENERAL CONTENT */
.ow_page_container, p, div, span, li, td, th {
    color: #1F618D !important;
}
/* IMPORTANT:
   Do NOT force global link colors here. This file loads after theme Custom CSS,
   and global link overrides break per-area styling (e.g. white text on dark overlays). */

/* 6. PURE WHITE TEXT FOR BARS (#FFFFFF) */

/* Navigation Links (Discovery, Search, etc.) */
.ow_site_menu a,
.ow_site_menu a:visited,
.ow_site_menu a:hover,
.ow_site_menu a span,
.ow_menu_wrap a,
.ow_menu_wrap a:visited,
.ow_menu_wrap a:hover,
.ow_menu_wrap a span,
.ow_main_menu a,
.ow_main_menu a:visited,
.ow_main_menu a:hover,
.ow_main_menu a span {
    color: #ffffff !important;
    text-shadow: none !important;
}

/* Console Links (Messages, Admin, etc.) */
.ow_console a,
.ow_console a:visited,
.ow_console a:hover,
.ow_console a span {
    color: #ffffff !important;
    text-shadow: none !important;
}

/* Content Tabs */
.ow_content_menu a,
.ow_content_menu a:visited,
.ow_content_menu a:hover,
.ow_content_menu a span {
    color: #ffffff !important;
    text-shadow: none !important;
}

/* Widget Titles (Hot List, Bookmarks, etc.) */
.ow_box_cap h3,
.ow_box_cap h3 span,
.ow_box_cap,
.ow_box_cap_empty h3,
.ow_box_cap_empty {
    color: #ffffff !important;
    text-shadow: none !important;
}

/* 6.1 Profile cards: make overlay name + hover info white */
.ow_ulist_big_info,
.ow_ulist_big_info *,
.ow_ulist_big_info a,
.ow_ulist_big_info a:visited,
.ow_ulist_big_info_name,
.ow_ulist_big_info_name *,
.ow_ulist_big_info_name a,
.ow_ulist_big_info_name a:visited,
.ow_ulist_big_item_cont .ow_tooltip .ow_tooltip_body,
.ow_ulist_big_item_cont .ow_tooltip .ow_tooltip_body *,
.ow_ulist_big_item_cont .ow_tooltip .ow_tooltip_body a,
.ow_ulist_big_item_cont .ow_tooltip .ow_tooltip_body a:visited {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: none !important;
}

/* 6.2 Photo gallery cards (Search / My Matches): make overlay name + hover info white
 * Markup example:
 *  .ow_photo_item_info .ow_usearch_display_name
 *  .ow_usearch_user_info (shown on hover)
 */
.ow_photo_item_info,
.ow_photo_item_info *,
.ow_photo_item_info a,
.ow_photo_item_info a:visited,
.ow_photo_item_info .ow_usearch_display_name,
.ow_photo_item_info .ow_usearch_display_name *,
.ow_usearch_user_info,
.ow_usearch_user_info *,
.ow_usearch_user_info a,
.ow_usearch_user_info a:visited,
.ow_usearch_user_info a:hover,
.ow_photo_userlist_info,
.ow_photo_userlist_info * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: none !important;
}

/* 6.3 Profile page: normalize action buttons to match Noir context actions (More/Moderation)
 *
 * More/Moderation use Noir `.ow_context_action` styles:
 *   background-color: rgba(118,118,118,0.3); border: 1px solid rgba(113,113,113,0.5);
 *   hover: background-color rgba(118,118,118,0.5); border-color rgba(129,129,129,0.75)
 */
body.base_profile_page ul.ow_profile_action_toolbar > li > a,
body.base_profile_page ul.ow_profile_action_toolbar > li > a:visited {
    display: inline-block !important;
    height: 18px !important;
    line-height: 18px !important;

    background-color: rgba(118, 118, 118, 0.3) !important;
    border: 1px solid rgba(113, 113, 113, 0.5) !important;
    border-radius: 2px !important;

    padding: 0 10px !important;
    margin: 0 !important; /* spacing handled by flex gap */

    /* Match what users currently see on More/Moderation (link color from Custom CSS) */
    color: #1F618D !important;
    -webkit-text-fill-color: #1F618D !important;
    text-shadow: none !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

body.base_profile_page ul.ow_profile_action_toolbar > li > a:hover {
    background-color: rgba(118, 118, 118, 0.5) !important;
    border-color: rgba(129, 129, 129, 0.75) !important;
    text-decoration: none !important;
}

/* 6.4 Profile toolbar layout: keep 5 buttons evenly spaced/aligned
 * Structure:
 *  .ow_profile_action_toolbar_wrap
 *    ul.ow_profile_action_toolbar (3 links)
 *    div.ow_context_action_block (More)
 *    div.ow_context_action_block (Moderation)
 */
body.base_profile_page .ow_profile_action_toolbar_wrap {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    /* One single source of truth for spacing between ALL 5 buttons */
    column-gap: 10px !important;
    row-gap: 8px !important;
}

body.base_profile_page .ow_profile_action_toolbar_wrap ul.ow_profile_action_toolbar {
    /* Flatten the <ul> so its children participate in the wrapper flex layout.
       This removes any reserved width/float behavior that can create "phantom" gaps. */
    display: contents !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important; /* neutralize ow_left */
    list-style: none !important;
}
body.base_profile_page .ow_profile_action_toolbar_wrap ul.ow_profile_action_toolbar > li {
    display: contents !important;
}

/* Hard-stop any "double margin" between Remove bookmark and More.
   Some legacy CSS can add right-margin to toolbar links; we only want flex gap spacing. */
body.base_profile_page .ow_profile_action_toolbar_wrap ul.ow_profile_action_toolbar,
body.base_profile_page .ow_profile_action_toolbar_wrap ul.ow_profile_action_toolbar > li,
body.base_profile_page .ow_profile_action_toolbar_wrap ul.ow_profile_action_toolbar > li:last-child,
body.base_profile_page .ow_profile_action_toolbar_wrap ul.ow_profile_action_toolbar > li > a,
body.base_profile_page .ow_profile_action_toolbar_wrap ul.ow_profile_action_toolbar > li:last-child > a {
    margin-right: 0 !important;
}

/* Make the 2 dropdown buttons match the same size/padding */
body.base_profile_page .ow_profile_action_toolbar_wrap .ow_context_action_block {
    margin: 0 !important;
    padding: 0 !important;
    float: none !important; /* neutralize theme/profile floats */
    text-align: left !important;
    flex: 0 0 auto !important;
}

/* ow.css adds margin-left:4px on .ow_context_action_value_block; remove it to keep even spacing */
body.base_profile_page .ow_profile_action_toolbar_wrap .ow_context_action_value_block,
body.base_profile_page .ow_profile_action_toolbar_wrap .ow_profile_toolbar_group {
    margin-left: 0 !important;
}

/* Force More/Moderation to EXACTLY match the 18px buttons (ow.css makes them 22px on profiles) */
body.base_profile_page .ow_profile_action_toolbar_wrap .ow_context_action_block .ow_context_action {
    display: inline-flex !important;
    align-items: center !important;
    height: 18px !important;
    line-height: 18px !important;
    padding: 0 10px !important;
    border-radius: 2px !important;
    box-sizing: border-box !important;

    background-color: rgba(118, 118, 118, 0.3) !important;
    border: 1px solid rgba(113, 113, 113, 0.5) !important;
}

body.base_profile_page .ow_profile_action_toolbar_wrap .ow_context_action_block .ow_context_action:hover,
body.base_profile_page .ow_profile_action_toolbar_wrap .ow_context_action_block .ow_context_action.active {
    background-color: rgba(118, 118, 118, 0.5) !important;
    border-color: rgba(129, 129, 129, 0.75) !important;
}

body.base_profile_page .ow_profile_action_toolbar_wrap .ow_context_action_value,
body.base_profile_page .ow_profile_action_toolbar_wrap .ow_context_more {
    height: 18px !important;
    line-height: 18px !important;
}

body.base_profile_page .ow_profile_action_toolbar_wrap .ow_context_action_value {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.base_profile_page .ow_profile_action_toolbar_wrap .ow_context_more {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 0 0 6px !important;
    min-width: 12px !important;
    width: 12px !important;
    background-position: center !important; /* prevent arrow sprite from "pushing" perceived height */
}

/* Profile "User photos" widget: make "View all" match the same style */
body.base_profile_page .profile-PHOTO_CMP_UserPhotosWidget .ow_box_toolbar.ow_bl li a,
body.base_profile_page .profile-PHOTO_CMP_UserPhotosWidget .ow_box_toolbar.ow_bl li a:visited {
    display: inline-block !important;
    height: 18px !important;
    line-height: 18px !important;
    padding: 0 10px !important;

    background-color: rgba(118, 118, 118, 0.3) !important;
    border: 1px solid rgba(113, 113, 113, 0.5) !important;
    border-radius: 2px !important;

    color: #1F618D !important;
    -webkit-text-fill-color: #1F618D !important;
    text-shadow: none !important;
    text-decoration: none !important;
}

body.base_profile_page .profile-PHOTO_CMP_UserPhotosWidget .ow_box_toolbar.ow_bl li a:hover {
    background-color: rgba(118, 118, 118, 0.5) !important;
    border-color: rgba(129, 129, 129, 0.75) !important;
    text-decoration: none !important;
}

/* Profile photo "Chat" overlay: match the same style */
body.base_profile_page .ow_profile_gallery_avatar_image .ow_lbutton.ow_green,
body.base_profile_page .ow_profile_gallery_avatar_image .ow_lbutton.ow_green:hover {
    background-color: rgba(118, 118, 118, 0.3) !important;
    border: 1px solid rgba(113, 113, 113, 0.5) !important;
    border-radius: 2px !important;
    color: #1F618D !important;
    -webkit-text-fill-color: #1F618D !important;
    text-shadow: none !important;
}

body.base_profile_page .ow_profile_gallery_avatar_image .ow_lbutton.ow_green:hover {
    background-color: rgba(118, 118, 118, 0.5) !important;
    border-color: rgba(129, 129, 129, 0.75) !important;
}

/* Profile User Photos thumbnail clipping: let the list render fully */
body.base_profile_page .profile-PHOTO_CMP_UserPhotosWidget .ow_lp_albums,
body.base_profile_page .profile-PHOTO_CMP_UserPhotosWidget .ow_lp_photos {
    overflow: visible !important;
}

/* 7. Inputs */
input[type="text"], 
input[type="password"], 
textarea, 
select {
    background-color: #f9f9f9 !important;
    color: #333333 !important;
    border: 1px solid #ccc !important;
}

/* 8. Theme Specific Overrides */
.ow_bg_color {
    background: #ffffff !important;
    background-image: none !important;
}

/* 9. Mobile Header Height Reduction */
@media only screen and (max-width: 900px) {
    html body div.owm_logo, 
    html body div.owm_logo a {
        height: 45px !important;
        min-height: 45px !important;
        max-height: 45px !important;
        margin: 5px 0 !important;
        background-size: contain !important;
        background-position: center !important;
        width: 100% !important;
        display: block !important;
    }
}
