/* File: wp-content/plugins/qcash-converter/assets/css/qcash.css */

/* ========== Floating Button ========== */
.qcash-root { position: fixed; z-index: 9980; bottom: 20px; }
.qcash-pos-right { right: 20px; }
.qcash-pos-left  { left: 20px; }
.qcash-fab {
  background: #2563eb; color: #fff; border: none; border-radius: 9999px;
  padding: 14px 16px; font-size: 20px; box-shadow: 0 8px 22px rgba(0,0,0,.18);
  cursor: pointer; transition: transform .08s ease, box-shadow .2s;
}
.qcash-fab:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(0,0,0,.22); }
.qcash-fab:focus { outline: 2px solid #93c5fd; outline-offset: 2px; }

/* ========== Overlay & Modal ========== */
.qcash-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
  z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 18px;
}
.qcash-overlay.show { opacity: 1; pointer-events: auto; }

.qcash-modal {
  width: min(520px, 100%); border-radius: 16px; overflow: hidden;
  box-shadow: 0 12px 38px rgba(0,0,0,.28); border: 1px solid rgba(0,0,0,.12);
  background-clip: padding-box;
}
/* Ensure all children size with borders/padding included */
.qcash-modal *, .qcash-modal *::before, .qcash-modal *::after { box-sizing: border-box; }

.qcash-light .qcash-modal { background: #ffffff; color: #111827; border-color: rgba(0,0,0,.10); }
.qcash-dark  .qcash-modal { background: #111827; color: #e5e7eb; border-color: rgba(255,255,255,.12); }

.qcash-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid rgba(0,0,0,.08); font-weight: 600;
}
.qcash-dark .qcash-header { border-bottom-color: rgba(255,255,255,.10); }

.qcash-close {
  background: #111827; color: #fff; border: none; border-radius: 10px;
  font-size: 20px; padding: 6px 10px; cursor: pointer; transition: all .2s ease;
}
.qcash-light .qcash-close { background: #0f172a; }
.qcash-close:hover { background: #e11d48; }

/* ========== Inner Wrapper (keeps gap from border) ========== */
.qcash-body { padding: 18px; }
.qcash-content {
  padding: 16px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  background: #fff;
  overflow: hidden; /* Prevent focused rings from spilling outside */
}
.qcash-dark .qcash-content {
  border-color: rgba(255,255,255,.10);
  background: #0f1220;
}

/* ========== Form Controls ========== */
.qcash-row { margin-bottom: 14px; }
.qcash-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.qcash-row input,
.qcash-row select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: transparent;
  color: inherit;
  font-size: 15px;
}
/* Light theme solid background so focus effect stays inside */
.qcash-light .qcash-row input,
.qcash-light .qcash-row select { background: #ffffff; }

/* Replace outline with inner box-shadow to avoid overflow */
.qcash-row input:focus,
.qcash-row select:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(37,99,235,.35);
}

.qcash-dark .qcash-row input,
.qcash-dark .qcash-row select { border-color: #374151; background: #0b1220; }

.qcash-row input::placeholder { color: #9ca3af; }

/* ========== Actions ========== */
.qcash-row.actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap;
}
.qcash-row button {
  padding: 12px 18px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; font-weight: 600; transition: all .2s ease;
}
.qcash-row .swap    { background: #e5e7eb; color: #111827; }
.qcash-row .swap:hover { background: #d1d5db; }
.qcash-row .convert { background: #2563eb; color: #fff; }
.qcash-row .convert:hover { background: #1d4ed8; }

/* ========== Result ========== */
.qcash-result {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(0,0,0,.12);
  font-size: 17px; font-weight: 600; line-height: 1.5;
}
.qcash-dark .qcash-result { border-top-color: rgba(255,255,255,.12); }
.qcash-rate { font-size: 13px; opacity: .8; margin-top: 4px; }

/* ========== Responsive ========== */
@media (max-width: 520px) {
  .qcash-modal { border-radius: 14px; }
  .qcash-content { padding: 14px; }
  .qcash-row.two { grid-template-columns: 1fr; }
  .qcash-row.actions { justify-content: stretch; }
  .qcash-row .swap, .qcash-row .convert { width: 100%; }
  .qcash-result { text-align: center; }
}

@media (max-width: 400px) {
  .qcash-root { bottom: 14px; }
  .qcash-pos-right { right: 14px; }
  .qcash-pos-left  { left: 14px; }
}