/* ===========================
   TOPUP / GIFT – COMPONENTS
   =========================== */

/* Topup misc */
.pi-symbol { font-family:'Courier New', monospace; font-size:1.1em; font-weight:bold; }
#conversionResult { margin-top:20px; font-size:1.1em; font-weight:bold; }
#formError { color:#e53935; font-size:.9em; display:none; margin-bottom:10px; }
.disabled-form { pointer-events:none; opacity:.6; }
#amountSection { display:none; }

.spinner-border{
  width:1.8rem; height:1.8rem;
  border:.25em solid #ddd; border-top:.25em solid var(--primary);
  border-radius:50%; animation:spin .8s linear infinite; margin:12px auto;
}
@keyframes spin{ to{ transform:rotate(360deg); } }

/* Gift – Select2 */
.select2-container--default .select2-selection--single{
  background-color:var(--card);
  border:1px solid var(--border);
  border-radius:12px;
  padding:8px 12px; height:auto;
  box-shadow:0 2px 4px rgba(0,0,0,0.05);
  font-size:1em; font-weight:500;
  display:flex; align-items:center; color:var(--text);
}
.select2-container--default .select2-selection--single .select2-selection__arrow{ height:100%; right:10px; }
.select2-container--default .select2-selection--single .select2-selection__rendered{
  color:var(--text); line-height:1.4; padding-left:5px; display:flex; align-items:center;
}
.select2-results__option{ display:flex; align-items:center; padding:8px; gap:8px; color:var(--text); }
.select2-results__option img{ width:20px; height:14px; object-fit:contain; margin-right:6px; border-radius:3px; }

/* Gift – grid carduri */
.card-wrapper{
  display:flex; flex-wrap:wrap; justify-content:center; align-items:flex-start;
  gap:20px; margin-top:30px;
}
.card{
  border:1px solid var(--border);
  border-radius:12px; padding:15px; width:240px; text-align:center;
  background:var(--card); color:var(--text);
  box-shadow:var(--shadow);
}
.card img{ max-width:120px; margin-bottom:10px; }
.card select, .card input{
  margin-top:10px; width:100%; padding:6px;
  background:var(--surface); color:var(--text);
  border:1px solid var(--border); border-radius:8px;
}
.card button{
  margin-top:10px; padding:8px; width:100%;
  border:none; border-radius:8px;
  background:var(--primary); color:#fff; cursor:pointer;
}

/* Pagination */
.pagination{
  display:flex; justify-content:center; align-items:center; gap:6px;
  margin-top:25px; font-size:.85em;
}
.pagination button{
  background:var(--primary); color:#fff; border:none; border-radius:8px;
  padding:5px 10px; font-size:.9em; cursor:pointer; min-width:38px;
  box-shadow:0 1px 2px rgba(0,0,0,0.1);
}
.pagination button:disabled{ background-color:#aaa; cursor:not-allowed; }
.pagination span{ font-weight:500; color:var(--text); min-width:60px; text-align:center; }

/* Search input */
#searchInput{
  margin-top:20px; padding:8px; width:100%; max-width:400px; display:block; margin-left:auto; margin-right:auto;
  background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:8px;
}

/* Filter pills */
.filter-buttons{ margin-top:8px; }
.filter-btn{
  margin:0 5px; padding:6px 14px; border:1px solid var(--border); border-radius:20px;
  background:var(--surface); cursor:pointer; color:var(--text);
}
.filter-btn.active{ background:var(--primary); color:#fff; border-color:var(--primary); }

/* Bottom navigation (mobil) */
.bottom-nav{
  position:fixed; bottom:0; left:0; width:100%;
  background:var(--card); border-top:1px solid var(--border);
  display:flex; justify-content:space-around; align-items:center; padding:14px 0;
  box-shadow:0 -2px 6px rgba(0,0,0,0.05); z-index:1000;
  border-top-left-radius:16px; border-top-right-radius:16px;
}
.bottom-nav a{
  text-decoration:none; color:var(--muted); font-size:13px; display:flex; flex-direction:column; align-items:center; font-weight:500;
}
.bottom-nav a.active{ color:var(--primary); font-weight:600; }
.bottom-nav a i{ font-size:22px; margin-bottom:4px; }

/* Info blocks */
.pi-warning{
  background:var(--warn-bg); border:1px solid var(--border); border-left:5px solid #ffb300;
  padding:16px; border-radius:10px; color:var(--warn-text); margin-bottom:20px;
}
.pi-warning h3{ margin:0 0 8px; font-size:16px; font-weight:600; }
.pi-warning p{ margin:0; font-size:14px; }

/* „benefit” list items (comune) */
.benefit-item.alt{
  display:flex; gap:14px; align-items:flex-start;
  background:var(--card); border:1px solid var(--border);
  border-radius:12px; padding:16px; box-shadow:var(--shadow);
}
.benefit-icon{ font-size:22px; color:var(--primary); flex-shrink:0; padding-top:2px; }
.benefit-content h4{ margin:0; font-size:15.5px; font-weight:600; color:var(--primary); }
.benefit-content p{ font-size:14px; color:var(--text); margin:4px 0 0; line-height:1.5; }

/* „Login required” sticky bar button state */
#piLoginNotice button:disabled{ opacity:.6; cursor:not-allowed; }
/* ==========================================================
   TOPUP RESTORATION PACK — append-only, theme-aware (no hardcodes)
   Se bazează exclusiv pe variabilele deja definite în :root din style2.css
   ========================================================== */

/* ——— „Cum funcționează” + beneficii (layout vechi, pe variabile) ——— */
.benefits-wrapper{ background: #f8f9ff; }
.topup-benefits{ max-width:960px; margin:0 auto; padding:24px 16px; }
.topup-benefits .section-title{ color:var(--primary); text-align:center; margin:0 0 16px; }

.benefits-grid{ display:flex; flex-direction:column; gap:16px; }
@media (min-width:640px){ .benefits-grid{ flex-direction:row; } }

.benefit-item{
  display:flex; align-items:center; gap:16px;
  background:var(--card); border:1px solid var(--border);
  border-radius:16px; padding:16px;
  box-shadow:var(--shadow); transition:transform .1s ease-in-out;
}
.benefit-item:hover{ transform:scale(1.02); cursor:pointer; }
.benefit-item .benefit-icon{ font-size:22px; color:var(--primary); flex-shrink:0; padding-top:2px; }
.benefit-item .benefit-content h4{ margin:0; font-size:15.5px; font-weight:600; color:var(--primary); }
.benefit-item .benefit-content p{ font-size:14px; color:var(--text); margin:4px 0 0; line-height:1.5; }

/* ——— Mesaje login/status ——— */
#loginStatusMessage{ text-align:center; color:var(--primary); }
#mustLoginMessage{ text-align:center; color:var(--warn-text); font-weight:700; font-size:15px; margin-top:10px; }

/* ——— Form Topup ——— */
.topup-form .container{ max-width:640px; margin:0 auto; }
.topup-form label{ display:block; font-weight:600; margin:12px 0 6px; }
.topup-form input[type="tel"],
.topup-form input[type="number"],
.topup-form select{
  width:100%; padding:10px 12px; border:1px solid var(--border);
  border-radius:10px; background:var(--surface); color:var(--text);
}
.topup-form .btn{ display:inline-block; background:var(--btn-bg); color:var(--btn-text);
  border:none; border-radius:10px; padding:10px 18px; font-weight:700; cursor:pointer; }
.topup-form .btn[disabled]{ opacity:.5; cursor:not-allowed; }

.disabled-form{ opacity:.6; pointer-events:none; }

/* ——— Operator select (detected + manual) ——— */
#operator-info{ margin-top:20px; }
#detected-operator-message{ font-weight:700; color:var(--primary); margin-bottom:10px; }
#operatorSelect{ width:100%; padding:8px; margin-bottom:15px; border-radius:10px; border:1px solid var(--border); background:var(--surface); color:var(--text); }

/* ——— Loader planuri ——— */
#plansLoader{ text-align:center; padding:1rem; }
#plansLoader .spinner-border{
  display:inline-block; width:28px; height:28px; border:3px solid rgba(0,0,0,.12);
  border-top-color: var(--primary); border-radius:50%; animation:topup-spin .6s linear infinite;
}
@keyframes topup-spin{ to{ transform: rotate(360deg); } }

/* ——— Suma / estimare ——— */
#amountSection{ margin-top:20px; }
#amountSection select{ width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--text); }
#amountSection input[type="number"]{ width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--text); }

#conversionResult{ margin-top:20px; font-size:1.1em; font-weight:700; display:none; }
#conversionResult.is-visible{ display:block; }
#estimatedValue{ font-weight:700; }

/* ——— Erori form ——— */
#formError{ color:#e53935; font-size:.92em; display:none; margin:8px 0 10px; }

/* ——— Sticky login bar (inserat din JS) ——— */
#piLoginNotice{
  position:fixed; left:0; right:0; bottom:calc(var(--bottom-nav-h) + 8px);
  background:#fdfdfd; border-top:1px solid var(--border);
  box-shadow:0 -4px 10px rgba(0,0,0,.05);
  padding:16px 12px; box-sizing:border-box; z-index:9999; animation:topup-slideUp .4s ease-out;
}
#piLoginNotice p{ margin:0; font-size:15px; color:var(--primary); font-weight:500; text-align:center; }
#piLoginNotice button{
  margin-top:10px; background:var(--btn-accent); color:var(--btn-accent-text);
  border:none; font-weight:700; padding:8px 20px; border-radius:8px; cursor:pointer;
}
@keyframes topup-slideUp{ from{ transform:translateY(100%); opacity:0 } to{ transform:translateY(0); opacity:1 } }

/* ——— Bottom nav (mobil) ——— */
.bottom-nav{
  position:fixed; bottom:0; left:0; width:100%;
  background:var(--card); border-top:1px solid var(--border);
  display:flex; justify-content:space-around; align-items:center; padding:14px 0;
  box-shadow:0 -2px 6px rgba(0,0,0,0.05); z-index:1000;
  border-top-left-radius:16px; border-top-right-radius:16px;
}
.bottom-nav a{
  text-decoration:none; color:var(--muted); font-size:13px;
  display:flex; flex-direction:column; align-items:center; font-weight:500;
}
.bottom-nav a.active{ color:var(--primary); font-weight:600; }
.bottom-nav a i{ font-size:22px; margin-bottom:4px; }

/* ——— Mobile tweaks ——— */
@media (max-width:480px){
  .benefit-item{ padding:12px; border-radius:12px; }
}
/* =========================================================
   Topup page — stiluri extrase din inline + lipsurile restaurate
   Se bazează pe token-urile globale deja definite în app-style2.css
   ========================================================= */

/* --------- Utilitare --------- */
.hidden{ display:none !important; }
.is-hidden{ display:none !important; }
.mb-20{ margin-bottom:20px; }
.fade-out{ transition:opacity .5s; opacity:0; }

/* ========= BENEFITS (susul paginii) ========= */
.benefits-wrapper{ margin: 0 auto; }
.topup-benefits{
  background:#dee1fa;
  padding:1.5rem .5rem;
  text-align:center;
  border-radius:12px;
  max-width:1000px;
  margin:0.75rem auto 1.25rem;
  border:1px solid #e5e7eb;
}
.section-title{
  font-size:1.4rem;
  color:#1a237e;
  margin:0 0 1rem;
  font-weight:700;
}
.benefits-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:1rem;
  max-width:800px;
  margin:0 auto;
}
.benefit-item{
  background:#fff;
  border-radius:12px;
  padding:1.2rem;
  box-shadow:0 2px 8px rgba(0,0,0,.05);
  text-align:center;
  transition:transform .2s, box-shadow .2s;
  border:1px solid #e5e7eb;
}
.benefit-item:hover{ transform:translateY(-2px); box-shadow:0 6px 18px rgba(0,0,0,.08); }
.benefit-item .benefit-icon{ margin-bottom:.6rem; }
.benefit-item .benefit-icon i{ font-size:2rem; color:#1a237e; }
.benefit-item h4{ font-size:1.05rem; margin:.25rem 0; color:#222; }
.benefit-item p{ font-size:.92rem; color:#555; }

/* ========= CONTENER + FORM ========= */
.topup-form .container{
  max-width:1000px; width:95%;
  margin:1rem auto; padding:1rem;
  background:var(--card); color:var(--text);
  border-radius:10px; box-shadow:var(--shadow); box-sizing:border-box;
  border:1px solid var(--border);
}

/* titlul „status login” (fost inline pe #loginStatusMessage) */
#loginStatusMessage{
  text-align:center;
  color:var(--primary);
}

/* „Trebuie să te loghezi” (fost inline pe #mustLoginMessage) */
#mustLoginMessage{
  text-align:center; color:#b71c1c; font-weight:700;
  font-size:15px; margin-top:10px; display:none;
}

/* telefon (fost inline pe #phone) */
#phone{ width:100%; margin-bottom:10px; }

/* eroare formular */
#formError, .form-error{
  color:#b71c1c; margin:.5rem 0; display:none;
}

/* operator info (fost inline pe #operatorInfo) */
#operatorInfo{
  margin-top:10px; font-weight:700; color:var(--primary);
}

/* bloc operator select (fost inline pe #operator-info) */
#operator-info{ display:none; margin-top:20px; }
#detected-operator-message{
  font-weight:700; color:var(--primary); margin-bottom:10px;
}
#operatorSelect{ width:100%; padding:8px; margin-bottom:15px; }

/* loader planuri (fost inline pe #plansLoader) */
#plansLoader{ text-align:center; padding:1rem; display:none; }
#plansLoader .spinner-border{
  width:32px; height:32px; border:3px solid rgba(0,0,0,.15);
  border-top-color:rgba(0,0,0,.6); border-radius:50%;
  animation:spin .8s linear infinite; margin:0 auto;
}
#plansLoader p{ margin-top:.5rem; }

/* secțiunea sumă/planuri (fost inline pe #amountSection) */
#amountSection{ margin-top:20px; }

/* rezultat conversie (fost inline pe #conversionResult) */
#conversionResult{
  margin-top:20px; font-size:1.1em; font-weight:700; display:none;
}

/* buton continuă (fost inline „margin-top: 20px;”) */
#topupForm .btn{ margin-top:20px; }

/* aspect „formular dezactivat” când nu ești logat */
.disabled-form input,
.disabled-form select,
.disabled-form button,
.disabled-form textarea{
  pointer-events:none; opacity:.6;
}

/* ========= intl-tel-input (skin light/dark minim) ========= */
.iti{ width:100%; }
.iti__flag-container{ z-index: 1; }
.iti input[type=tel]{ background:var(--card); color:var(--text); }
.iti__country-list{
  background:var(--card); color:var(--text);
  border:1px solid var(--border);
  box-shadow:0 8px 24px rgba(0,0,0,.12);
}

/* ========= Bara sticky de login (înlocuiește inline din JS) ========= */
.pi-login-notice{
  position:fixed; left:0; right:0; bottom:70px;
  background:var(--card); border-top:1px solid var(--border);
  box-shadow:0 -4px 10px rgba(0,0,0,.05);
  padding:16px 12px; box-sizing:border-box; z-index:9999;
  animation:slideUp .4s ease-out;
}
.pi-login-notice__inner{ max-width:600px; margin:0 auto; text-align:center; }
.pi-login-notice p{ margin:0; font-size:15px; color:var(--primary); font-weight:500; }
.pi-login-notice .login-btn{
  margin-top:10px; background:var(--btn-bg); color:var(--btn-text);
  border:none; font-weight:600; padding:8px 20px; border-radius:8px; cursor:pointer;
}
.pi-login-notice .login-btn[disabled]{ opacity:.6; cursor:not-allowed; }

/* ========= Butoane & inputs de bază (armonizate cu restul site-ului) ========= */
#topupForm label{ display:block; margin:.4rem 0 .25rem; font-weight:600; }
#topupForm input[type="number"],
#topupForm input[type="text"],
#topupForm input[type="tel"],
#topupForm select{
  width:100%; padding:.6rem .7rem; border-radius:8px;
  background:var(--card); color:var(--text);
  border:1px solid var(--border);
  box-sizing:border-box;
}
#topupForm button.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:.7rem 1rem; border-radius:10px; font-weight:700;
  background:var(--btn-bg); color:var(--btn-text); border:0; cursor:pointer;
  transition:transform .06s ease, filter .15s ease;
}
#topupForm button.btn:active{ transform:translateY(1px); }
#topupForm button.btn:hover{ filter:brightness(.98); }

/* ========= Dark tweaks ========= */
[data-theme="dark"] .topup-benefits{
  background:#0f172a; color:#e5e7eb;
  border:1px solid #1f2937;
  box-shadow:0 10px 24px rgba(0,0,0,.45);
}
[data-theme="dark"] .benefit-item{
  background:#0b1220; color:#e5e7eb;
  border:1px solid #243047;
  box-shadow:0 6px 14px rgba(0,0,0,.35);
}
[data-theme="dark"] .benefit-item p{ color:#cbd5e1; }
[data-theme="dark"] .benefit-item .benefit-icon i{ color:#8ab4f8; }

[data-theme="dark"] #plansLoader .spinner-border{
  border-color:rgba(255,255,255,.15);
  border-top-color:rgba(255,255,255,.75);
}

[data-theme="dark"] .pi-login-notice{ background:var(--surface); }

/* ========= Animații ========= */
@keyframes spin{ to{ transform:rotate(360deg); } }
@keyframes slideUp{ from{ transform:translateY(100%); opacity:0 } to{ transform:translateY(0); opacity:1 } }

/* ========= Responsive ========= */
@media (max-width:600px){
  .topup-benefits{ padding:1.1rem .6rem; }
  .section-title{ font-size:1.25rem; }
}
/* ===== Butoane globale (readuce look-ul vechi) ===== */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:.7rem 1rem;
  border-radius:10px;
  font-weight:700;
  background:var(--btn-bg);     /* #ffd700 pe light, #d0b200 pe dark din tokens */
  color:var(--btn-text);
  border:0;
  cursor:pointer;
  box-shadow:0 2px 6px rgba(0,0,0,.05);
  transition:transform .06s ease, filter .15s ease, box-shadow .15s ease;
}
.btn:hover{ filter:brightness(.98); }
.btn:active{ transform:translateY(1px); }

.btn-primary{ background:var(--btn-bg); color:var(--btn-text); }
.btn-outline{
  background:transparent; color:var(--primary);
  border:1px solid var(--primary);
}
[data-theme="dark"] .btn-outline{
  color:#93c5fd; border-color:#93c5fd;
}

/* butonul de pe topup (fost “margin-top:20px” inline) */
#topupForm .btn{ margin-top:20px; }

/* pe mobil poți vrea full-width */
@media (max-width:480px){
  .btn{ width:100%; }
}
/* ===== Bridge de culori pentru topup (fără layout) ===== */

/* titluri/status */
#loginStatusMessage { color: var(--primary, #1a237e); }
#mustLoginMessage   { color: var(--warn-text, #b71c1c); }

/* info operator */
#operatorInfo              { color: var(--primary, #1a237e); }
#detected-operator-message { color: var(--primary, #1a237e); }

/* spinner – doar culoarea */
.spinner-border { border-top-color: var(--primary, #1a237e) !important; }

/* bara sticky de login (culori doar) */
#piLoginNotice{
  background: var(--card, #fdfdfd) !important;
  border-top: 1px solid var(--border, #d6d9e6) !important;
}
#piLoginNotice p{
  color: var(--primary, #1a237e) !important;
}
#piLoginNotice button{
  background: var(--btn-accent, #ffd700) !important;
  color: var(--btn-accent-text, #000) !important;
}
