/* ==========================================================================
   Greenshaala - base.css  (Nov 2026 redesign)
   Design tokens, reset, buttons, forms, messages and the login pop-up.
   Loaded on every page (storefront, user area, admin).
   ========================================================================== */

:root {
  --green-950: #0c2a1f;
  --green-900: #12372a;
  --green-700: #1f5d3a;
  --green-600: #2a7449;
  --green-500: #3c9460;
  --green-100: #e2efe5;
  --green-50:  #f1f7f2;
  --cream:     #f8f6f0;
  --sand:      #efe8d9;
  --accent:    #d9713a;
  --accent-soft:#fbeadf;
  --ink:       #16231c;
  --text:      #33433a;
  --muted:     #66756b;
  --line:      #e3e7e0;
  --white:     #ffffff;
  --danger:    #c0392b;
  --danger-soft:#fbe9e6;
  --warn:      #b7791f;
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(18, 55, 42, .06), 0 1px 3px rgba(18, 55, 42, .05);
  --shadow:    0 8px 24px rgba(18, 55, 42, .09);
  --shadow-lg: 0 24px 60px rgba(18, 55, 42, .16);
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --container: 1240px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-600); }
ul, ol { list-style: none; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; font-weight: 600; }
h1, h2 { font-family: var(--font-head); letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.c-pointer { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(60, 148, 96, .45); outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---------- buttons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; min-height: 42px;
  border: 1.5px solid var(--green-700); border-radius: 999px;
  background: var(--green-700); color: #fff;
  font-weight: 600; font-size: .93rem; line-height: 1.2; white-space: nowrap;
  cursor: pointer; text-decoration: none;
  transition: background .18s, border-color .18s, color .18s, transform .12s, box-shadow .18s;
}
.btn:hover { background: var(--green-600); border-color: var(--green-600); color: #fff; box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn a { color: inherit; }
.btn-large, .btn-lg { padding: 13px 28px; min-height: 50px; font-size: 1rem; }
.btn-medium { padding: 10px 20px; }
.btn-small, .btn-sm { padding: 6px 14px; min-height: 34px; font-size: .84rem; }
.btn-primary { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--green-50); border-color: var(--green-500); color: var(--green-700); box-shadow: none; }
.btn-light { background: #fff; border-color: #fff; color: var(--green-900); }
.btn-light:hover { background: var(--green-50); border-color: var(--green-50); color: var(--green-900); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.14); border-color: #fff; color: #fff; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--green-900); border-color: var(--green-900); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #a93226; border-color: #a93226; }

.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex: 0 0 42px;
  border: 1.5px solid var(--line); border-radius: 50%;
  background: #fff; color: var(--ink); font-size: 1rem; cursor: pointer;
  transition: border-color .18s, background .18s, color .18s;
}
.icon-btn:hover { border-color: var(--green-500); background: var(--green-50); color: var(--green-700); }

/* ---------- forms -------------------------------------------------------- */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"],
input[type="search"], input[type="url"], input[type="date"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
select { cursor: pointer; padding-right: 34px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2366756b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 11px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(60, 148, 96, .15); }
input::placeholder, textarea::placeholder { color: #9aa79f; }
label { font-weight: 600; font-size: .88rem; color: var(--ink); }
.field { display: flex; flex-direction: column; gap: 6px; }
.error { color: var(--danger); font-size: .86rem; }

/* ---------- flash message (js/common/all_pages.js adds the up/down classes) */
.flashmessage {
  position: fixed; top: 18px; left: 50%; z-index: 1200;
  transform: translate(-50%, -160%);
  max-width: min(560px, calc(100vw - 32px)); padding: 14px 22px;
  background: var(--green-900); color: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); text-align: center; font-weight: 500;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.flashmessage h2, .flashmessage h3, .flashmessage h4 { color: #fff; font-family: var(--font-body); font-size: 1rem; font-weight: 600; }
.flashmessage h3, .flashmessage h4 { font-weight: 400; font-size: .9rem; opacity: .9; }
.flashmessage-down { transform: translate(-50%, 0); }
.flashmessage-up { transform: translate(-50%, -160%); }

/* ---------- toasts ------------------------------------------------------- */
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 1300; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  background: var(--ink); color: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
  font-size: .92rem; font-weight: 500; animation: toast-in .3s ease both;
}
.toast i { color: #7ddba0; }
.toast.is-error i { color: #ff9a8a; }
.toast.is-leaving { animation: toast-out .3s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(12px); } }

/* ---------- modals: message pop-up and login pop-up (common/aside.php) --- */
.pop-message-modal-wrapper, .user-login-modal-wrapper {
  display: none; position: fixed; inset: 0; z-index: 1100;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(12, 42, 31, .55); backdrop-filter: blur(3px);
}
.pop-message-modal-container, .user-login-modal-container {
  position: relative; width: 100%; max-width: 460px; max-height: calc(100vh - 40px); overflow: auto;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 30px 28px;
}
.user-login-modal-container { max-width: 760px; }
.pop-message-modal-wrapper .close-pop-message-box,
.user-login-modal-wrapper > .close-user-login-box,
.user-login-modal-container > .close-user-login-box {
  position: absolute; top: 14px; right: 16px; font-size: 1.5rem; color: var(--muted); cursor: pointer; z-index: 2;
}
.user-login-modal-wrapper > .close-user-login-box { position: fixed; top: 22px; right: 26px; color: #fff; font-size: 1.9rem; }
.close-pop-message-box:hover, .close-user-login-box:hover { color: var(--danger); }
.common-pop-message { text-align: center; font-size: 1rem; }

/* login / signup blocks (pop-up and /user/login page share this markup) */
.login > h2 { text-align: center; margin-bottom: 20px; }
.login-section-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.login-section {
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px 20px; background: var(--green-50);
}
.login-section h3 { font-size: 1rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
#tele-login-section h3::before, #page-tele-login-section h3::before { content: "\f2c6"; font-family: "Font Awesome 6 Brands"; color: #229ed9; font-size: 1.2rem; }
#email-login-section h3::before, #page-email-login-section h3::before { content: "\f0e0"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--green-600); }
.contactUsForm { display: flex; flex-direction: column; gap: 12px; }
.contactUsForm form, #login_block_1, #login_block_2, #login_block_3 { display: flex; flex-direction: column; gap: 12px; }
.signup_text_box { width: 100%; }
#click_here { align-self: flex-start; }
.forgot_pass { font-size: .88rem; color: var(--muted); text-decoration: underline; }
#telegram-login-wrapper { min-height: 44px; }

@media (max-width: 640px) {
  .login-section-wrapper { grid-template-columns: 1fr; }
  .pop-message-modal-container, .user-login-modal-container { padding: 24px 18px; }
}

/* ---------- small shared pieces ----------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .76rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--green-600);
}
.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 56px 20px; text-align: center; color: var(--muted);
  background: #fff; border: 1.5px dashed var(--line); border-radius: var(--radius-lg);
}
.empty-state i { font-size: 2.2rem; color: var(--green-500); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--green-100); color: var(--green-700); }
.badge-warn { background: #fdf1d8; color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: #eef0ec; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
