/* =========================================
   1. ძირითადი სტილები (Base Styles)
   ========================================= */
body { 
    margin: 0; 
    background-color: #222; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    height: 100vh; 
    font-family: 'Arial', sans-serif; 
}

.mobile-screen { 
    width: 375px; 
    height: 812px; 
    background-color: #FF0000; 
    color: white; 
    position: relative; 
    padding: 10px 25px 20px 25px; 
    box-sizing: border-box; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
}

.top-nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-top: 5px; 
    height: 40px; 
}

.lang-selector-simple, .login-link, .lang-text, #menu-lang-text { 
    cursor: pointer; 
    font-weight: bold; 
    font-size: 18px; 
    text-transform: uppercase; 
}

.page-container { 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
}

#main-page { 
    justify-content: flex-start !important; 
    padding-top: 50px; 
}

.content-center { 
    width: 100%; 
    text-align: center; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

.main-title { 
    font-size: 20px; 
    font-weight: 700; 
    margin-top: 5px; 
    margin-bottom: 20px; 
    line-height: 1.2; 
}

.main-logo { margin-bottom: 25px; }

.main-buttons-container { 
    width: 100%; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
}

.btn-clear { 
    background: none; 
    border: 2px solid white; 
    color: white; 
    padding: 18px; 
    border-radius: 50px; 
    font-size: 16px; 
    font-weight: bold; 
    cursor: pointer; 
    text-transform: uppercase; 
}

.main-action-btn { 
    width: 100%; 
    padding: 20px; 
    border: none; 
    border-radius: 50px; 
    background-color: #E8E8E8; 
    color: #333; 
    font-weight: bold; 
    font-size: 18px; 
    cursor: pointer; 
    text-transform: uppercase; 
    margin-top: 10px; 
}

.form-container { 
    width: 100%; 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
}

input { 
    width: 100%; 
    padding: 16px; 
    border-radius: 12px; 
    border: none; 
    font-size: 16px; 
    box-sizing: border-box; 
    background-color: white;
}

.phone-row { display: flex; gap: 10px; width: 100%; }

.country-box { 
    background: white; 
    color: black; 
    padding: 16px; 
    border-radius: 12px; 
    font-weight: bold; 
}

.back-link { 
    margin-top: 15px; 
    font-weight: bold; 
    cursor: pointer; 
    text-transform: uppercase; 
    font-size: 16px;
    padding-bottom: 10px;
}

/* =========================================
   2. მენიუს და ეკრანის სტილები
   ========================================= */
.menu-screen {
    position: absolute; 
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #ff0000;
    color: white;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    text-align: center;
    z-index: 100;
}

.top-nav-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    margin-bottom: 20px;
}

.user-profile { display: flex; align-items: center; gap: 10px; }
.account-icon { width: 35px; height: 35px; }
.user-name { font-size: 18px; font-weight: bold; }

.main-container-menu { 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

.brand-name { 
    margin-top: 20px; 
    font-size: 24px; 
    font-weight: bold; 
}

.cross-logo { width: 60px; margin: 20px auto; }

.menu-links { 
    display: flex; 
    flex-direction: column; 
    gap: 35px; 
    margin-top: 20px; 
    font-size: 22px; 
}

.link-item { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 12px; 
    cursor: pointer; 
}

.apple-img { width: 32px; height: 32px; }

/* =========================================
   3. FOOD BANK სპეციფიკური სტილები
   ========================================= */
#food-bank-page {
    justify-content: flex-start !important; 
    padding-top: 20px;
    overflow-y: auto; 
}

.brand-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    justify-items: center;
}

.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s; 
}

.brand-item:active {
    transform: scale(0.95); 
}

.brand-item img {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    object-fit: contain; 
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
    padding: 5px; 
    box-sizing: border-box;
}

.brand-item span {
    font-size: 10px;
    margin-top: 5px;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
}

/* =========================================
   4. დონაციის და ძიების შედეგების სტილები
   ========================================= */

/* ნაბიჯი 2 & 3: შედეგების Grid */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 120px);
    gap: 20px;
    justify-content: center;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
}

/* 120x120 პატარა ფოტოების ჩარჩო */
.donor-photo-frame {
    width: 120px;
    height: 120px;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
}

.donor-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* რომ არ დაიჭრას ფოტო */
}

/* ნაბიჯი 4: დეტალური ხედი (230x230) */
.item-detail-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    color: white;
    text-align: center;
}

.detail-photo-frame {
    width: 230px;
    height: 230px;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    position: relative;
}

.detail-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ისარი (34x34) */
.next-arrow {
    width: 34px;
    height: 34px;
    position: absolute;
    right: 0px; /* ფოტოს გვერდით გამოსაჩენად */
    cursor: pointer;
}

/* Contact Donor ღილაკი */
.contact-donor-btn {
    width: 221px;
    height: 47px;
    background-color: #CAFFB7;
    color: black;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 20px;
}

/* =========================================
   5. ფორმები და ჩატის სტილები - გასწორებული
   ========================================= */
   @keyframes blink-animation {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

.blink-button {
    animation: blink-animation 1s infinite;
    background-color: #27e2df !important; /* ცისფერი ფერი, რომ მიხვდეს რატომ ციმციმებს */
    color: black !important;
    border: 2px solid white;
}
/* 5. ჩატის მესიჯების სტილები (გასუფთავებული) */

#messages-container {
    height: 400px !important;
    overflow-y: auto !important;
    background: #ffffff !important; 
    border-radius: 15px;
    margin: 10px auto;
    width: 95%;
    display: flex !important;
    flex-direction: column !important; /* აქ გასწორდა columnn */
}

#chat-messages {
    flex-grow: 1;
    width: 100%;
    display: flex !important; /* აქ დაამატე */
    flex-direction: column !important; /* აქაც */
    gap: 10px;
    padding: 10px;
}

/* საერთო სტილი ორივესთვის */
/* 5. ჩატის მესიჯების სტილები */
.msg {
    display: block !important;
    max-width: 80% !important;
    padding: 10px 15px !important;
    border-radius: 15px !important;
    margin: 5px 10px !important;
    font-family: sans-serif !important;
}

.msg.sent {
    background-color: #CAFFB7 !important; /* მწვანე */
    color: black !important;
    margin-left: auto !important;
    display: block !important;
}

.msg.received {
    background-color: #f3caee !important; /* თეთრი */
    color: black !important;
    margin-right: auto !important;
    display: block !important;
}
select, textarea {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-family: inherit;
    box-sizing: border-box;
}

textarea { resize: none; }

.otp-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
}

.otp-input {
    width: 45px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: white;
    color: black;
}

#make-item-sub-container select, #request-item-sub-container select {
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}
/* =========================================
   USER PROFILE (TOP NAV) - FIXED DESIGN
   ========================================= */

.nav-account-block {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-left: auto; /* აჩოჩებს მარჯვნივ, როგორც სქრინზეა */
}

.user-initials-nav {
    color: white;
    font-weight: bold;
    font-size: 18px; /* ზუსტად ის ზომა, რაც სქრინზე გაქვს */
    text-transform: uppercase;
    order: 2; /* MM იქნება ხატულას შემდეგ */
}

.account-icon-nav {
    width: 35px; /* ზომა აღებულია შენი .account-icon კლასიდან */
    height: 35px;
    order: 1; /* ხატულა იქნება პირველი */
}
/* 1. ნავბარის გასწორება */
.top-nav {
    position: fixed;    /* ნავბარი ყოველთვის თავში დარჩება სქროლვისას */
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;       /* სტანდარტული სიმაღლე */
    z-index: 9999;      /* ყველაზე მაღალი შრე */
    display: flex;
    align-items: center;
    padding: 0 15px;
    box-sizing: border-box;
    /* აქ შეგიძლია ფონიც მისცე, თუ გინდა რომ გამჭვირვალე არ იყოს */
    background-color: rgba(0, 0, 0, 0.05); 
}

/* 2. წითელი მენიუს კონტეინერის ჩამოწევა */
#user-menu-page {
    padding-top: 80px !important; /* 60px ნავბარისთვის + 20px ჰაერი */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 3. ლოგოს ზომის და პოზიციის დაზუსტება წითელ მენიუში */
.cross-logo {
    width: 80px;
    height: auto;
    margin-bottom: 20px;
}

/* ჩატის ბარათის კონტეინერი */
.chat-card {
    background: rgb(255, 255, 255);
    color: black;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 15px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    font-family: sans-serif;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* მსუბუქი ჩრდილი */
}

/* სახელის სტილი */
.chat-card strong {
    font-size: 16px;
    display: block;
    color: #000;
    margin-bottom: 3px;
}

/* ქვედა ტექსტი (TAP TO VIEW) */
.chat-card span {
    font-size: 12px;
    color: #666;
    display: block;
}

/* მწვანე ისარი */
.chat-card .arrow {
    color: #28a745;
    font-size: 22px;
    font-weight: bold;
}
/* წაუკითხავი ჩატის ბარათის სტილი */
.chat-card.unread {
    background-color: #77d2e9 !important; /* ოქროსფერი/ყვითელი (შეგიძლია შეცვალო) */
    border: 2px solid #d47777;           /* ნარინჯისფერი ჩარჩო */
}

/* წაუკითხავი მესიჯის დროს ტექსტი რომ გამუქდეს */
.chat-card.unread strong {
    color: #000 !important;
    font-weight: bold;
}

.model-container {
    width: 180px;  /* შეგიძლია გაზარდო 220px-მდე თუ პატარა მოგეჩვენა */
    height: 180px;
    margin: 10px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

model-viewer {
    width: 100%;
    height: 100%;
    outline: none;
}

/* სპეციალური ზომა მენიუს 3D მოდელისთვის */
.menu-model {
    width: 120px !important;
    height: 120px !important;
    margin: 0 auto 15px auto; /* დამატებით: ცოტა დააცილებს ქვედა ტექსტებს */
}