/* lock scroll when modal open */
html.mclsm-modal-open, html.mclsm-modal-open body { overflow: hidden; }

.mclsm-modal { display:none; }
.mclsm-modal.is-open { display:block; position:fixed; inset:0; z-index:99999; }

.mclsm-modal__backdrop {
  position:absolute; inset:0;
  background: rgba(0,0,0,.55);
}

.mclsm-modal__dialog {
  position:relative;
  width:min(420px, 92vw);
  margin: 10vh auto;
  background: #0b1f12;
  border: 1px solid rgba(0, 160, 90, .35);
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: 0 16px 60px rgba(0,0,0,.45);
}

.mclsm-modal__close {
  position:absolute; top:10px; right:10px;
  width:34px; height:34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06);
  color:#fff;
  cursor:pointer;
  font-size: 20px;
}

.mclsm-modal__title { margin: 0 0 12px; color:#fff; }

.mclsm-label { display:block; margin: 10px 0 6px; color: rgba(255,255,255,.9); font-size: .95rem; }

.mclsm-input {
  width:100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 160, 90, .35);
  background: rgba(0,0,0,.20);
  color:#fff;
  outline:none;
}

.mclsm-input:focus { border-color: rgba(0, 200, 110, .9); }

.mclsm-message { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: .9rem; }
.mclsm-message.error { background: rgba(180,50,50,.25); border: 1px solid rgba(200,80,80,.35); color:#f0a0a0; }
.mclsm-message.success { background: rgba(0,100,50,.25); border: 1px solid rgba(0,140,70,.35); color:#90e0a0; }

/* ===== Tabs (new) ===== */
.mclsm-tab-row{
  display:flex;
  gap:10px;
  margin: 8px 0 12px;
}

.mclsm-tab{
  flex:1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 160, 90, .35);
  background: rgba(0,0,0,.20);
  color: rgba(255,255,255,.9);
  cursor:pointer;
  font-weight:600;
}

.mclsm-tab.is-active{
  background: linear-gradient(180deg, #00a848 0%, #008030 100%);
  border-color: rgba(0, 200, 110, .65);
}

/* ===== Panels (new) ===== */
.mclsm-panel { display:none; }
.mclsm-panel.is-active { display:block; }

/* ===== Buttons ===== */
.mclsm-btn {
  position: relative;
  width:100%;
  margin-top: 14px;
  padding: 10px 12px;
  border:0;
  border-radius: 10px;
  background: linear-gradient(180deg, #00a848 0%, #008030 100%);
  color:#fff;
  cursor:pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mclsm-btn-secondary{
  background: rgba(0,0,0,.20);
  border: 1px solid rgba(0, 160, 90, .35);
}

.mclsm-btn .mclsm-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: rgba(255,255,255,1);
  animation: mclsm-spin .8s linear infinite;
  display: none;
}

@keyframes mclsm-spin {
  to { transform: rotate(360deg); }
}

.mclsm-btn.is-loading {
  opacity: .85;
  cursor: not-allowed;
  transform: none !important;
}

.mclsm-btn.is-loading .mclsm-spinner {
  display: inline-block;
}

/* ===== Buttons side-by-side (new) ===== */
.mclsm-action-row{
  display:flex;
  gap:10px;
  margin-top: 14px;
}
.mclsm-action-row > *{
  flex:1;
  margin-top: 0; /* กัน margin-top ของ .mclsm-btn */
}

/* ===== contact row layout ===== */
.mclsm-contact-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.mclsm-contact-row .flex-1 {
  flex: 1;
}

/* ===== base button ===== */
.mclsm-contact-row a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 12px;
  font-size: .9rem;
  font-weight: 600;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  transition: all .18s ease;
}

/* ===== LINE ===== */
.mclsm-contact-row .btn-line {
  background: linear-gradient(180deg, #89c403 5%, #77a809);
  border: 1px solid #05a84a;
}

.mclsm-contact-row .btn-line:hover {
  background: linear-gradient(180deg, #89c403 5%, #77a809);
  transform: translateY(-1px);
}

/* ===== TELEGRAM ===== */
.mclsm-contact-row .btn-te {
  background: linear-gradient(180deg, #3d94f6 5%, #1e62d0);
  border: 1px solid #1b8ec2;
}

.mclsm-contact-row .btn-te:hover {
  background: linear-gradient(180deg, #3d94f6 5%, #1e62d0);
  transform: translateY(-1px);
}

/* ===== icon ===== */
.mclsm-contact-row img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.mclsm-bank-picker{
  display:flex;
  align-items:center;
  gap:10px;
}

.mclsm-bank-logo{
  width:28px;
  height:28px;
  object-fit:contain;
  border-radius: 6px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  padding: 4px;
}

.mclsm-select{
  appearance:auto;
}

/* ===== actions row ===== */
.mclsm-actions-2 {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* ให้ปุ่มกินพื้นที่เท่ากัน */
.mclsm-actions-2 .mclsm-btn {
  flex: 1;
  width: 100%;
  margin-top: 0; /* กันปุ่มล่างตก */
}

/* ปุ่ม ghost (ไปหน้า login) */
.mclsm-btn--ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
}

.mclsm-btn--ghost:hover {
  background: rgba(255,255,255,.08);
}

@media (max-width: 420px) {
  .mclsm-actions-2 {
    flex-direction: column;
  }
}

/* ===== bank dropdown (รูปธนาคารแค่ใน dropdown) ===== */
.mclsm-bank-dropdown-wrap {
  position: relative;
  width: 100%;
}

/* ซ่อน select จริง แต่ยังใช้ส่งค่าตอน submit */
#mclsm_reg_bank_id.mclsm-bank-select-hidden {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.mclsm-bank-dropdown {
  position: relative;
  z-index: 1;
}

.mclsm-bank-trigger {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 160, 90, .35);
  background: rgba(0,0,0,.20);
  color: #fff;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  appearance: none;
  display: flex;
  align-items: center;
  position: relative;
}
.mclsm-bank-trigger__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.mclsm-bank-trigger__placeholder {
  color: rgba(255,255,255,.6);
}
.mclsm-bank-trigger__logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}
.mclsm-bank-trigger__name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mclsm-bank-trigger::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(255,255,255,.7);
  margin-top: 3px;
}
.mclsm-bank-dropdown.is-open .mclsm-bank-trigger::after {
  border-top-color: transparent;
  border-bottom-color: rgba(255,255,255,.7);
  margin-top: -9px;
}

.mclsm-bank-list {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  max-height: 220px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid rgba(0, 160, 90, .35);
  background: rgba(12, 28, 18, .98);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  z-index: 10;
}
.mclsm-bank-dropdown.is-open .mclsm-bank-list {
  display: block;
}

.mclsm-bank-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background .15s;
}
.mclsm-bank-option:last-child {
  border-bottom: none;
}
.mclsm-bank-option:hover {
  background: rgba(0, 160, 90, .2);
}

.mclsm-bank-option__logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.mclsm-bank-option__name {
  font-size: .95rem;
}

