/* --- PAGRINDINIS KONTEINERIS (Wrapper) --- */
.amer-main-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* Tarpas tarp kortelių */
  max-width: 1100px;
  margin: 0 auto;
  align-items: flex-start; /* Kortelės gali būti skirtingo aukščio */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #334155;
  box-sizing: border-box;
}

.amer-main-container * { box-sizing: border-box; }

/* Kintamieji */
.amer-main-container {
  --ac-tint-copart: rgba(37, 99, 235, 0.05);
  --ac-tint-iaai: rgba(220, 38, 38, 0.05);
  --ac-accent-copart: #2563eb;
  --ac-accent-iaai: #dc2626;
  --ac-primary: #1e293b;
  --ac-border: #e2e8f0;
  --ac-text: #475569;
}

/* --- KAIRĖ PUSĖ (SKAIČIUOKLĖ - Balta kortelė) --- */
.amer-calc-wrap {
  flex: 1.4; /* Šiek tiek platesnė */
  min-width: 340px;
  
  background: #fff;
  border-radius: 16px;
  padding: 35px;
  
  /* Šešėlis tik skaičiuoklei */
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08); 
  border: 1px solid transparent; /* Rezervuota aktyviam borderiui */
  transition: all 0.3s ease;
}

/* --- DEŠINĖ PUSĖ (INFO - Pilkšvas blokas) --- */
.amer-info-wrap {
  flex: 1;
  min-width: 300px;
  
  /* Stilius kaip "Svarbi informacija" bloko */
  background: #f8fafc; 
  border: 1px solid var(--ac-border);
  border-radius: 16px;
  padding: 35px;
  /* Be šešėlio, kad atrodytų kaip info blokas */
}

/* Mobilus vaizdas */
@media (max-width: 900px) {
  .amer-main-container { flex-direction: column; gap: 0; }
  .amer-calc-wrap { 
    border-radius: 16px 16px 0 0; 
    border-bottom: 1px solid var(--ac-border);
    box-shadow: none;
  }
  .amer-info-wrap { 
    border-radius: 0 0 16px 16px; 
    border-top: none;
  }
}

/* --- DINAMINIS STILIUS (Tik kairiajai kortelei) --- */
.theme-copart .amer-calc-wrap { border-color: rgba(37, 99, 235, 0.2); }
.theme-iaai .amer-calc-wrap { border-color: rgba(220, 38, 38, 0.2); }

/* Tabs */
.theme-copart .type-tab.active { background-color: var(--ac-tint-copart); color: var(--ac-accent-copart); border-color: rgba(37, 99, 235, 0.2); }
.theme-iaai .type-tab.active { background-color: var(--ac-tint-iaai); color: var(--ac-accent-iaai); border-color: rgba(220, 38, 38, 0.2); }

/* Inputs focus */
.theme-copart .input-wrap input:focus, .theme-copart .input-wrap select:focus { border-color: var(--ac-accent-copart); box-shadow: 0 0 0 3px var(--ac-tint-copart); }
.theme-iaai .input-wrap input:focus, .theme-iaai .input-wrap select:focus { border-color: var(--ac-accent-iaai); box-shadow: 0 0 0 3px var(--ac-tint-iaai); }

/* Values & Radios */
.theme-copart .total-val, .theme-copart .radio-custom.checked { color: var(--ac-accent-copart); border-color: var(--ac-accent-copart); }
.theme-copart .radio-custom.checked::after { background: var(--ac-accent-copart); }

.theme-iaai .total-val, .theme-iaai .radio-custom.checked { color: var(--ac-accent-iaai); border-color: var(--ac-accent-iaai); }
.theme-iaai .radio-custom.checked::after { background: var(--ac-accent-iaai); }

/* Dešinės pusės ikonos */
.theme-copart .time-icon-box { color: var(--ac-accent-copart); border-color: rgba(37, 99, 235, 0.15); background: #fff; }
.theme-iaai .time-icon-box { color: var(--ac-accent-iaai); border-color: rgba(220, 38, 38, 0.15); background: #fff; }


/* --- ELEMENTAI (Vidinis stilius) --- */

/* Tabs */
.ac-type-tabs { display: flex; gap: 12px; margin-bottom: 30px; }
.type-tab {
  flex: 1; text-align: center; padding: 12px; cursor: pointer; border-radius: 10px;
  font-weight: 600; color: #64748b; border: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s ease;
  background: #fff; font-size: 14px;
}
.type-tab:hover { border-color: #cbd5e1; }

/* Radio */
.ac-auction-select { display: flex; gap: 30px; margin-bottom: 30px; padding-left: 5px; }
.radio-label { display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--ac-primary); font-size: 15px; }
.radio-custom {
  width: 20px; height: 20px; border: 2px solid #cbd5e1; border-radius: 50%; margin-right: 10px; position: relative; transition: all 0.2s;
}
.radio-custom::after {
  content:''; position: absolute; top: 3px; left: 3px; right: 3px; bottom: 3px; background: transparent; border-radius: 50%; transition: background 0.2s;
}
.radio-label input { display: none; }

/* Inputs */
.input-wrap { margin-bottom: 20px; }
.input-wrap label {
  display: block; font-size: 12px; font-weight: 700; margin-bottom: 8px; color: #64748b; text-transform: uppercase; letter-spacing: 0.6px;
}
.input-wrap input, .input-wrap select {
  width: 100%; padding: 14px 16px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 15px; outline: none; transition: all 0.2s; color: #1e293b; background: #fff;
}

/* Results */
.ac-results-list { margin-top: 15px; }
.res-row {
  display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid #f1f5f9; font-size: 14px;
}
.res-label { color: #475569; }
.res-val { font-weight: 600; color: #1e293b; }

.highlight-row {
  background: #f8fafc; border-radius: 10px; padding: 16px; margin: 15px 0; border: 1px dashed #cbd5e1;
}

.res-total-row {
  display: flex; justify-content: space-between; align-items: center; margin-top: 25px; padding-top: 25px; border-top: 2px solid #e2e8f0;
}
.total-label { font-size: 16px; font-weight: 800; color: #1e293b; text-transform: uppercase; }
.total-val { font-size: 28px; font-weight: 800; }

.qs-icon {
  display: inline-flex; width: 18px; height: 18px; background: #f1f5f9; color: #64748b;
  border: 1px solid #e2e8f0; border-radius: 50%; font-size: 11px; font-weight: 700; align-items: center; justify-content: center;
  cursor: pointer; margin-left: 6px; position: relative; top: -1px; transition:0.2s;
}
.qs-icon:hover { background: #e2e8f0; color: #1e293b; }


/* --- TIMELINE (Dešinėje) --- */
.amer-info-title { margin-top: 0; margin-bottom: 35px; font-size: 18px; font-weight: 700; color: #1e293b; text-transform: uppercase; letter-spacing: 0.5px; }
.amer-timeline { display: flex; flex-direction: column; position: relative; padding-left: 5px; }
.time-step { display: flex; align-items: flex-start; gap: 20px; position: relative; padding-bottom: 40px; }
.time-step:last-child { padding-bottom: 0; }

.time-step::before {
  content: ''; position: absolute; left: 22px; top: 45px; bottom: -5px; width: 2px; background: #e2e8f0;
}
.time-step:last-child::before { display: none; }

.time-icon-box {
  width: 46px; height: 46px; border-radius: 12px; border: 2px solid #e2e8f0; color: #94a3b8;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; z-index: 2; position: relative;
}
/* Paskutinė ikona visada žalia */
.time-step:last-child .time-icon-box { background: #ecfdf5 !important; border-color: #d1fae5 !important; color: #059669 !important; }

.time-content { padding-top: 4px; }
.time-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #94a3b8; font-weight: 700; margin-bottom: 5px; display: block; }
.time-val { font-size: 15px; font-weight: 600; color: #1e293b; line-height: 1.4;}

/* Info Notes (Atskirtas linija) */
.amer-info-notes {
  margin-top: 40px; padding-top: 30px; border-top: 1px solid #e2e8f0;
}
.note-head { font-size: 14px; font-weight: 700; color: #334155; margin: 0 0 12px 0; display: flex; align-items: center; gap: 8px; }
.amer-info-notes ul { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.amer-info-notes li {
  position: relative; padding-left: 18px; margin-bottom: 10px; font-size: 13px; color: #64748b; line-height: 1.5;
}
.amer-info-notes li::before {
  content: "•"; color: #cbd5e1; font-weight: bold; position: absolute; left: 0; top: 0; font-size: 14px;
}

/* --- MODALAS --- */
.ac-modal-overlay {
  display: none; position: fixed; z-index: 99999; left: 0; top: 0; width: 100%; height: 100%;
  background-color: rgba(15, 23, 42, 0.6); align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.ac-modal-box {
  background-color: #fff; border-radius: 16px; width: 90%; max-width: 450px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); display: flex; flex-direction: column; overflow: hidden; animation: acPopIn 0.2s ease-out;
}
@keyframes acPopIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.ac-modal-header {
  padding: 20px 24px; border-bottom: 1px solid #f1f5f9; display: flex; justify-content: space-between; align-items: center; background: #fff;
}
.ac-modal-title { font-weight: 700; font-size: 18px; margin: 0; color: #1e293b; }
.ac-modal-close { background: transparent; border: none; font-size: 28px; line-height: 1; cursor: pointer; color: #cbd5e1; transition: 0.2s; padding: 0; }
.ac-modal-close:hover { color: #ef4444; }
.ac-modal-body { padding: 24px; background: #fff; }
.ac-fee-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ac-fee-table td { padding: 12px 0; border-bottom: 1px dashed #e2e8f0; color: #475569; }
.ac-fee-table td:last-child { text-align: right; font-weight: 600; color: #1e293b; }
.ac-fee-table tr:last-child td { border-bottom: none; font-size: 16px; font-weight: 700; color: #1e293b; padding-top: 20px; }
.ac-modal-footer { padding: 16px 24px; background: #f8fafc; border-top: 1px solid #f1f5f9; text-align: right; }
.ac-btn-close { background: #fff; border: 1px solid #cbd5e1; color: #475569; font-weight: 600; font-size: 13px; padding: 10px 20px; border-radius: 8px; cursor: pointer; transition: 0.2s; }
.ac-btn-close:hover { background: #f1f5f9; border-color: #94a3b8; color: #1e293b; }