﻿/* ============================================== */
/* ===      Global Layout & Main Structure    === */
/* ============================================== */

html {
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

html, body, form#form1 {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 70px; /* Provides space for the fixed navbar */
    overflow-x: hidden; /* Prevents horizontal scrollbars */
}

/* Make the main form a flex container that grows */
form#form1 {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* This is the main content area that will grow to fill space */
main.main-content-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.footer {
    padding: 1.5rem 0;
    background-color: #f8f9fa;
    border-top: 1px solid #e7e7e7;
    text-align: center;
    flex-shrink: 0; /* Prevent footer from shrinking */
}

    .footer a {
        color: #6c757d;
        text-decoration: none;
        padding: 0 8px;
    }

        .footer a:hover {
            text-decoration: underline;
        }

/* תיקון עבור תיבת מידע (.alert-info) במצב ניגודיות גבוהה */
body.high-contrast .alert-info {
    background-color: #0d2a4b !important; /* רקע כחול כהה */
    color: #90cfff !important; /* טקסט תכלת בהיר וקריא */
    border-color: #0d6efd !important; /* גבול כחול בולט */
}

    /* תיקון עבור הקישורים בתוך תיבת המידע */
    body.high-contrast .alert-info .alert-link {
        color: #a3daff !important; /* צבע תכלת מעט בהיר יותר לקישור */
    }

/* ============================================== */
/* ===      Custom Main Navbar Styles         === */
/* ============================================== */

.navbar-custom {
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

    .navbar-custom .navbar-brand,
    .navbar-custom .nav-link {
        color: #495057;
        font-size: 1.1rem;
        font-weight: 500;
        padding: 0.75rem 1rem;
        position: relative;
        transition: all 0.3s ease;
    }

        .navbar-custom .nav-link .fas {
            color: #0d6efd;
            margin-left: 5px;
        }

        .navbar-custom .nav-link:hover,
        .navbar-custom .nav-link:focus,
        .navbar-custom .nav-link.active {
            color: #0d6efd;
        }

        .navbar-custom .nav-link::after {
            content: '';
            position: absolute;
            width: 0;
            height: 3px;
            bottom: -1px;
            left: 50%;
            background-color: #0d6efd;
            transition: all 0.3s ease-in-out;
        }

html[dir="rtl"] .navbar-custom .nav-link::after {
    transform-origin: bottom left;
}

.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after {
    width: 100%;
    left: 0;
}

html[dir="rtl"] .navbar-custom .nav-link:hover::after,
html[dir="rtl"] .navbar-custom .nav-link.active::after {
    transform-origin: bottom right;
}

.navbar-custom .dropdown-menu {
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.15);
}

.navbar-custom .dropdown-item {
    color: #495057;
}

    .navbar-custom .dropdown-item:hover,
    .navbar-custom .dropdown-item:focus {
        color: #1e2125;
        background-color: #e9ecef;
    }

    .navbar-custom .dropdown-item .fas {
        margin-left: 8px;
    }

/* ============================================== */
/* ===   Custom Form & Component Styles       === */
/* ============================================== */

.large-radio-list label,
.large-checkbox-list label {
    font-size: 1.1rem;
    padding-left: 20px;
    display: inline-block;
    cursor: pointer;
    vertical-align: middle;
    margin-bottom: 10px;
}

.large-radio-list input[type=radio],
.large-checkbox-list input[type=checkbox] {
    transform: scale(1.4);
    margin-left: 10px;
    cursor: pointer;
    position: relative;
    top: 2px;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-text-container,
.result-text-container {
    min-width: 0; /* Flexbox fix to allow truncation */
}

/* ============================================== */
/* ===       Messaging Page Specific Styles   === */
/* ============================================== */

.messages-card-flex {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-grow: 1;
}

.chat-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column-reverse;
}

.message-bubble {
    max-width: 75%;
    padding: 10px 15px;
    border-radius: 20px;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.message-sent {
    background-color: #dcf8c6;
    align-self: flex-start;
}

.message-received {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    align-self: flex-end;
}

.conversation-list {
    height: 100%;
    overflow-y: auto;
}

    .conversation-list .list-group-item.active {
        background-color: #0d6efd;
        border-color: #0d6efd;
        color: white;
    }

.unread-conversation {
    font-weight: bold;
}

/* ============================================== */
/* ===  Accessibility High Contrast Fixes     === */
/* ============================================== */

/* Base Styles */
body.high-contrast {
    background-color: black !important;
    color: white !important;
}

    body.high-contrast a {
        color: yellow !important;
        text-decoration: underline !important;
    }

    /* Navbar */
    body.high-contrast .navbar-custom {
        background-color: black !important;
        border-bottom-color: yellow !important;
    }

        body.high-contrast .navbar-custom .navbar-brand, body.high-contrast .navbar-custom .nav-link, body.high-contrast .navbar-custom .dropdown-item {
            color: yellow !important;
        }

            body.high-contrast .navbar-custom .nav-link .fas {
                color: yellow !important;
            }

        body.high-contrast .navbar-custom .navbar-toggler-icon {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 0, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
        }

        body.high-contrast .navbar-custom .nav-link::after {
            background-color: yellow !important;
        }

        body.high-contrast .navbar-custom .dropdown-menu {
            background-color: black !important;
            border-color: yellow !important;
        }

    /* Cards & Backgrounds */
    body.high-contrast .card, body.high-contrast .bg-light, body.high-contrast .list-group-item {
        background-color: #1a1a1a !important;
        color: #ffffff !important;
        border-color: #888 !important;
    }

    body.high-contrast .card-header {
        background-color: #252525 !important;
        border-bottom-color: #888 !important;
    }

    body.high-contrast .card-body {
        background-color: transparent !important;
    }

    /* Forms */
    body.high-contrast .form-label {
        color: #ffffff !important;
    }

    body.high-contrast .form-control, body.high-contrast .form-select {
        background-color: #333 !important;
        color: #fff !important;
        border-color: #888 !important;
    }

        body.high-contrast .form-control:focus, body.high-contrast .form-select:focus {
            border-color: yellow !important;
            box-shadow: 0 0 0 0.25rem rgba(255, 255, 0, 0.25) !important;
        }

    /* Alerts & Quotes */
    body.high-contrast .blockquote-footer {
        color: #cccccc !important;
    }

    body.high-contrast .alert-warning {
        background-color: #1a1a1a !important;
        color: #ffffff !important;
        border-color: #ffc107 !important;
    }

        body.high-contrast .alert-warning .alert-link {
            color: #ffeb3b !important;
        }

    body.high-contrast .alert-success {
        background-color: #0c3b0c !important;
        color: #90ee90 !important;
        border-color: #2e8b57 !important;
    }

    /* Lists & Tables */
    body.high-contrast .list-group-item-action:hover, body.high-contrast .list-group-item-action:focus {
        background-color: #333 !important;
        color: #ffffff !important;
    }

    body.high-contrast .text-muted {
        color: #b0b0b0 !important;
    }

    body.high-contrast .table > :not(caption) > * > * {
        background-color: transparent !important;
        color: #f0f0f0 !important;
    }

    body.high-contrast .table th, body.high-contrast .table td {
        border-color: #555 !important;
    }

    body.high-contrast .table th {
        color: #ffffff !important;
    }

    body.high-contrast .table-hover > tbody > tr:hover > * {
        --bs-table-accent-bg: #2a2a2a !important;
        color: #ffffff !important;
    }

    /* Messages */
    body.high-contrast .message-received {
        background-color: #2a2a2a !important;
        color: #ffffff !important;
        border-color: #555 !important;
    }

    body.high-contrast .message-sent {
        background-color: #002b36 !important;
        color: #ffffff !important;
        border: none;
    }

    /* Footer */
    body.high-contrast .footer {
        background-color: #000000 !important;
        color: #cccccc !important;
        border-top: 1px solid yellow !important;
    }

        body.high-contrast .footer a {
            color: yellow !important;
        }

/* ============================================== */
/* ===      Mobile Responsive Adjustments     === */
/* ============================================== */
@media (max-width: 767px) {
    .navbar-brand img {
        height: 40px;
    }

    .line-clamp-2 {
        overflow: visible !important;
        white-space: normal !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
    }

    .messaging-container-mobile .conversation-list-col {
        display: block;
        width: 100%;
        height: 85vh;
    }

    .messaging-container-mobile .message-view-col {
        display: none;
        width: 100%;
    }

    .messaging-container-mobile.mobile-show-messages .conversation-list-col {
        display: none;
    }

    .messaging-container-mobile.mobile-show-messages .message-view-col {
        display: block;
    }
}

.btn-like-profile {
    background-color: #f8bbd0; /* גוון ורוד בהיר */
    color: #333; /* צבע טקסט כהה יותר */
    padding: 8px 15px; /* ריווח פנימי */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px; /* התאם לגודל הגופן הכללי של הכפתורים */
    font-weight: bold; /* התאם למשקל הגופן הכללי */
    margin-left: 5px; /* רווח קטן משמאל לשאר הכפתורים */
}

    .btn-like-profile:hover {
        background-color: #f48fb1; /* גוון כהה יותר במעבר עכבר */
    }
/* Custom style for the 'Like' button with a white background */
.btn-like {
    background-color: #ffffff !important; /* רקע לבן */
    color: #dc3545 !important; /* צבע טקסט ולב אדום */
    border: 1px solid #dc3545 !important; /* מסגרת אדומה */
}

    /* Hover effect for the 'Like' button */
    .btn-like:hover {
        background-color: #dc3545 !important; /* רקע אדום במעבר עכבר */
        color: #ffffff !important; /* טקסט ולב לבנים במעבר עכבר */
    }

    /* Style for the disabled 'Already Liked' label */
    .btn-like.disabled {
        background-color: #dc3545 !important; /* רקע אדום מלא כשהלייק כבר נשלח */
        color: #ffffff !important;
        border-color: #dc3545 !important;
        opacity: 0.75; /* מעט שקוף כדי להראות שהוא לא לחיץ */
    }
/* עיצוב באנר קוקיז - Loveable */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    padding: 15px 20px;
    z-index: 10000;
    border-top: 3px solid #e91e63; /* פס ורוד/אדום שמתאים ל-Loveable */
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

    .cookie-banner.show {
        transform: translateY(0);
    }

.cookie-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: rtl;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.cookie-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    padding-left: 20px;
}

    .cookie-text strong {
        font-size: 16px;
        color: #e91e63; /* כותרת בצבע המותג */
    }

    .cookie-text a {
        color: #333;
        text-decoration: underline;
        font-weight: bold;
    }

.cookie-buttons button {
    background-color: #e91e63; /* כפתור ורוד/אדום */
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 50px; /* כפתור עגול ומודרני */
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s, transform 0.1s;
}

    .cookie-buttons button:hover {
        background-color: #c2185b; /* צבע כהה יותר במעבר עכבר */
        transform: scale(1.05);
    }

/* התאמה למובייל */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-text {
        padding-left: 0;
        margin-bottom: 15px;
    }

    .cookie-buttons button {
        width: 100%; /* כפתור רחב בנייד לנוחות לחיצה */
    }
}