@charset "UTF-8";

:root {
    color-scheme: light dark;           /* ← Important: tells browser we support both */
    /* Use 'light dark' instead of only light → allows proper switching without forced adaptation fights */

    --icon-tint: invert(16%) sepia(1%) saturate(1%) hue-rotate(22deg) brightness(94%) contrast(91%);

    --main_page_background: #0F0C29;

    --header_height: 39px;
    --header_background: #ffffff;
    --header_border_bottom: 1px solid rgba(0, 40, 100, 0.12);
    --header_logo: url(/img/logo/main.png);
    --header_logo_height: 40px;
    --header_logo_width: 110px;
    --header_burger_background: #686868;
    --header_button_text_color: #ffffff;
    --header_button_hover_background_color: rgba(0, 0, 0, 0.07);
    --header_search_box_background: #e8eef8;
    --header_icon_color: #5f6979;

    /* Core page colors – made slightly softer for better dark mode transition */
    --common_body_background: #f8f9fc;
    --common_page_background: #ffffff;
    --common_page_shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);
    --common_page_border_radius: 8px;           /* modernized radius */

    --button_border_radius: 8px;

    --button_primary_color: #FD5068 !important;
    --button_primary_hover_color: #f03d56;
    --button_primary_text_color: #ffffff;

    --button_secondary_color: #f1f1f4 !important;
    --button_secondary_hover_color: #e5e5ea;
    --button_secondary_text_color: #1a1a1f;

    --button_disabled_color: rgba(0,0,0,0.06) !important;
    --button_disabled_hover_color: rgba(0,0,0,0.12);
    --button_disabled_text_color: #6b7280 !important;

    --button_more_color: #e5e7eb !important;
    --button_more_hover_color: #d1d5db;
    --button_more_text_color: #374151;

    --button_link_color: transparent !important;
    --button_link_hover_color: #e5e7eb;
    --button_link_text_color: #3b82f6;
    --button_link_hover_text_color: #2563eb;

    --button_flat_color: transparent;
    --button_flat_hover_color: #f3f4f6;
    --button_flat_text_color: #ec4899;

    --button_card_action_color: #ef4444 !important;
    --button_card_action_hover_color: #dc2626;
    --button_card_action_text_color: #ffffff;
    --button_card_action_hover_text_color: #ffffff;

    --item_link_content: rgba(59, 130, 246, 0.05);
    --item_footer_link_color: #6b7280;
    --item_footer_active_link_color: #ef4444;
    --item_footer_button_color: transparent;
    --item_footer_button_hover_color: #f3f4f6;
    --item_footer_button_border_radius: 6px;
    --item_featured_shadow: 0 2px 0 0 #c2410c, 0 0 0 1px #f97316;
    --item_repost_background: #f9fafb;

    --switch_button_off_background_color: #d1d5db;
    --switch_button_on_background_color: #3b82f6;
    --switch_button_disabled_background_color: #9ca3af;
    --switch_button_slider_background_color: #ffffff;

    --separator_common: rgba(0, 0, 0, 0.08);
    --separator_alternate: #e5e7eb;

    --icon_tint: #6b7280;

    --side_menu_icon_tint: #ec4899;
    --side_menu_icon_tint_hover: #db2777;
    --side_menu_text_color: #4b5563;
    --side_menu_text_color_hover: #111827;
    --side_menu_li: transparent;
    --side_menu_li_hover: #f3f4f6;
    --side_menu_li_selected: #e5e7eb;
    --side_menu_border_radius: 6px;

    --input_text_background: #ffffff;
    --input_text_color: #1f2937;
    --input_text_placeholder_color: #9ca3af;
    --input_text_placeholder_color_focus: #9ca3af;
    --input_text_border: 1px solid #d1d5db;
    --input_text_border_focus: 1px solid #3b82f6;

    --form_footer_background: #f9fafb;

    --checkbox_label_background: #ffffff;
    --checkbox_checked_label_background: rgba(59, 130, 246, 0.08);

    --text_primary: #111827;
    --text_link: #2563eb;
    --text_link_hover: #1d4ed8;
    --text_title: #111827;
    --text_sub_title: #4b5563;
    --text_footer_link: #374151;

    --header_message_background: #3b82f6;
    --header_message_border_radius: 6px;
    --header_message_text_color: #ffffff;
    --header_message_shadow: 0 1px 3px rgba(0,0,0,0.1);

    --comment_bubble_background: #f3f4f6;

    --ls_menu_item_color: #ef4444;
    --ls_menu_selected_item_backround: #fef2f2;
    --ls_menu_selected_item_color: #111827;
    --ls_menu_selected_item_border_left_color: #ef4444;
    --ls_menu_selected_item_border_bottom_color: #ef4444;

    --dropdown_menu_background: #ffffff;
    --dropdown_menu_color: #111827;
    --dropdown_menu_hover_background: #f3f4f6;
    --dropdown_menu_shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);

    --verified_badge_background: #3b82f6;

    /* Alerts – improved contrast & modern feel */
    --alert_border_radius: 6px;

    --alert_warning_color: #ffffff;
    --alert_warning_background_color: #d97706;
    --alert_warning_border_color: transparent;

    --alert_success_color: #ffffff;
    --alert_success_background_color: #059669;
    --alert_success_border_color: transparent;

    --alert_danger_color: #ffffff;
    --alert_danger_background_color: #dc2626;
    --alert_danger_border_color: transparent;

    --alert_info_color: #ffffff;
    --alert_info_background_color: #2563eb;
    --alert_info_border_color: transparent;

    --chat-bubble-received-bg: #E9E9EB;
    --chat-bubble-received-text: #000000;
    --chat-bubble-sent-bg: #007AFF;
    --chat-bubble-sent-text: #ffffff;
    --chat-timestamp-color: rgba(0, 0, 0, 0.6);

    --overlay-background: rgba(255, 255, 255, 0.85);
    --overlay-text-primary: #333333;
    --overlay-text-secondary: #555555;

    --photo-slot-border-color: #cccccc;
    --photo-slot-background: #f8f8f8;
    --photo-slot-text: #999999;

    --messages-counter-bg: #00AFF0;

    --box-border-color: #999999;
    --box-controls-bg: #f2f2f2;
    --box-controls-border: #dae1e8;

    --profile-header-bg: #343a40;
    --profile-header-blur-bg: #343a40;
    --profile-header-text-shadow: #444444;
    --profile-header-title-color: #ffffff;
    --profile-header-info-color: #eeeeee;

    --manifestation-overlay-bg: rgba(0,0,0,0.9);

    --messages-counter-bg: rgba(70, 116, 233, 0.89);

    --match-overlay-bg: rgba(0, 0, 0, 0.85);
    --match-title-color: #FF4B5C;
    --match-subtitle-color: #ffffff;

    --chat-item-border: #eeeeee;
    --chat-item-hover-bg: #f8f9fa;

    --more-menu-trigger-bg: #ffffff;
    --more-menu-trigger-hover-bg: #f0f0f0;
}

/* ==============================================
   Respect user preference when no night mode forced
   ============================================== */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        /* Only apply dark adjustments if user prefers dark AND we didn't force light via cookie/data-theme */
        --common_body_background: #0f0f17;
        --common_page_background: #111827;
        --text_primary: #f3f4f6;
        --text_title: #f9fafb;
        --text_sub_title: #9ca3af;
        --text_link: #60a5fa;
        --text_link_hover: #3b82f6;
        --separator_common: rgba(255,255,255,0.08);
        --input_text_background: #1f2937;
        --input_text_color: #f3f4f6;
        --input_text_border: 1px solid #374151;
        --dropdown_menu_background: #1f2937;
        --dropdown_menu_color: #f3f4f6;
        --dropdown_menu_hover_background: #374151;
    }
}