/* ============================================================
 * TucoxSMS — Core Stylesheet (Sky Blue x Ocean Blue + White)
 * iOS Liquid Glass Aesthetics & Atmospheric Weather Animation
 * ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* ─── DATA SELECTION EXCEPTIONS (INPUTS, EMAILS, MESSAGES, CODES) ─── */
input,
textarea,
select,
[contenteditable="true"],
code,
pre,
.selectable,
.selectable-text,
.copyable,
.copyable-text,
.allow-select,
.user-badge,
.sms-table td,
.data-selectable,
.data-selectable *,
.device-card-value,
.contact-item,
.call-log-item,
.modal-body table td,
.modal-body p,
.modal-body pre,
.modal-body code,
.api-key-box,
.token-value,
.table-data,
.credential-display,
.apikey-field {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}

img, video {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: auto;
}

:root {
  /* Sky Blue x Ocean Blue Palette */
  --sky-lightest: #f0f9ff;
  --sky-light: #e0f2fe;
  --sky-soft: #bae6fd;
  --sky-medium: #7dd3fc;
  --sky-vibrant: #38bdf8;
  --ocean-teal: #0ea5e9;
  --ocean-blue: #0284c7;
  --ocean-deep: #0369a1;
  --ocean-dark: #075985;
  --ocean-navy: #082f49;

  /* iOS Liquid Glass Tokens */
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-bg-elevated: rgba(255, 255, 255, 0.90);
  --glass-card: rgba(255, 255, 255, 0.84);
  --glass-card-subtle: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.92);
  --glass-border-subtle: rgba(255, 255, 255, 0.60);
  --glass-shadow: 0 16px 36px -10px rgba(3, 105, 161, 0.16), 0 1px 0 0 rgba(255, 255, 255, 0.95) inset;
  --glass-shadow-lg: 0 24px 50px -12px rgba(2, 132, 199, 0.22), 0 1px 0 0 rgba(255, 255, 255, 1) inset;
  --glass-shadow-hover: 0 28px 60px -12px rgba(2, 132, 199, 0.32), 0 1px 0 0 rgba(255, 255, 255, 1) inset;

  /* Typography */
  --text-title: #082f49;
  --text-main: #0c4a6e;
  --text-muted: #334155;
  --text-dim: #64748b;

  /* Accents */
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-glow: rgba(2, 132, 199, 0.35);
  --accent-emerald: #059669;
  --accent-danger: #e11d48;
  --accent-amber: #d97706;

  /* Geometry & Fonts */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

body {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 35%, #7dd3fc 70%, #38bdf8 100%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── ATMOSPHERIC SKY WEATHER AMBIENT ──────────────────────── */
.weather-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.weather-orb-1 {
  position: absolute;
  top: -10%;
  left: 15%;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.88) 0%, rgba(186, 230, 253, 0.65) 50%, transparent 75%);
  filter: blur(50px);
  animation: orbDrift1 20s ease-in-out infinite alternate;
}

.weather-orb-2 {
  position: absolute;
  bottom: -15%;
  right: 5%;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.45) 0%, rgba(56, 189, 248, 0.3) 50%, transparent 75%);
  filter: blur(60px);
  animation: orbDrift2 25s ease-in-out infinite alternate;
}

.weather-orb-3 {
  position: absolute;
  top: 35%;
  right: 35%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(224, 242, 254, 0.55) 60%, transparent 80%);
  filter: blur(45px);
  animation: orbDrift3 18s ease-in-out infinite alternate;
}

@keyframes orbDrift1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.12); }
}

@keyframes orbDrift2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-50px, -60px) scale(1.08); }
}

@keyframes orbDrift3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(0.92); }
}

/* ─── BASE BUTTONS (IOS PILL CAPSULES) ──────────────────────── */
.btn-action {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 10px 18px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 99px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.3);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-action:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(2, 132, 199, 0.4);
}

.btn-action:active {
  transform: scale(0.96) translateY(0);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
  filter: brightness(0.95);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ocean-navy);
  border: 1px solid rgba(255, 255, 255, 0.95);
  padding: 9px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  border-radius: 99px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(3, 105, 161, 0.06);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  color: var(--ocean-blue);
  background: #fff;
  border-color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(3, 105, 161, 0.12);
}

.btn-secondary:active {
  transform: scale(0.96) translateY(0);
  background: rgba(240, 249, 255, 0.9);
}

.btn-danger {
  background: rgba(225, 29, 72, 0.1);
  border: 1px solid rgba(225, 29, 72, 0.25);
  color: #e11d48;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  border-radius: 99px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: rgba(225, 29, 72, 0.2);
  color: #be123c;
  transform: translateY(-1px);
}

.btn-danger:active {
  transform: scale(0.96) translateY(0);
  background: rgba(225, 29, 72, 0.3);
}

/* ─── TOAST NOTIFICATIONS (TOP-RIGHT LIQUID GLASS) ─────────── */
.toast-box {
  position: fixed;
  top: 24px;
  right: 24px;
  bottom: auto;
  left: auto;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 1);
  border-radius: 14px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ocean-navy);
  box-shadow: 0 12px 32px -6px rgba(2, 132, 199, 0.22), 0 0 0 1px rgba(14, 165, 233, 0.15);
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
}

.toast-item.toast-warning {
  border-left: 4px solid var(--accent-amber);
}

.toast-item.toast-error {
  border-left: 4px solid var(--accent-danger);
}

.toast-item.toast-success {
  border-left: 4px solid var(--accent-emerald);
}

.toast-icon {
  color: var(--ocean-blue);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.toast-badge-count {
  background: var(--ocean-blue);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
  letter-spacing: 0.05em;
}

@keyframes slideInRight {
  from { transform: translateX(100%) scale(0.9); opacity: 0; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
