/**
 * SpeakShift AI — SaaS Modal Styles
 */

/* ── Modal Overlay ─────────────────────────────────────────────── */
.ss-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  align-items: center;
  justify-content: center;
}
.ss-modal.ss-modal-open {
  display: flex;
}

.ss-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 0, 16, .82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ── Modal Box ─────────────────────────────────────────────────── */
.ss-modal-box {
  position: relative;
  background: #0d0020;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 2.5rem 2.25rem;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 40px 100px rgba(65,5,118,.5), 0 0 80px rgba(197,0,215,.15);
  animation: ssModalIn .3s cubic-bezier(.4,0,.2,1);
  color: #E7E7F2;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

@keyframes ssModalIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.ss-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: #C9C9DA;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}
.ss-modal-close:hover {
  background: rgba(197,0,215,.15);
  color: #fff;
}

.ss-modal-box h2 {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: .5rem;
}

.ss-modal-sub {
  color: #C9C9DA;
  font-size: .9rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* ── Form Elements ─────────────────────────────────────────────── */
.ss-form-group {
  margin-bottom: 1rem;
}
.ss-form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: #AFAFC4;
  margin-bottom: .35rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ss-form-group input,
.ss-form-group textarea {
  width: 100%;
  padding: .7rem 1rem;
  background: rgba(255,255,255,.04);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: #E7E7F2;
  font-family: inherit;
  font-size: .92rem;
  transition: border-color .2s, box-shadow .2s;
}
.ss-form-group input:focus,
.ss-form-group textarea:focus {
  outline: none;
  border-color: #c500d7;
  box-shadow: 0 0 0 3px rgba(197,0,215,.15);
}
.ss-form-group input::placeholder,
.ss-form-group textarea::placeholder {
  color: rgba(175,175,196,.5);
}

/* ── Radio group ───────────────────────────────────────────────── */
.ss-radio-group {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.ss-radio {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem 1rem;
  background: rgba(255,255,255,.03);
  border: 1.5px solid rgba(255,255,255,.08);
  border-radius: 10px;
  cursor: pointer;
  font-size: .9rem;
  transition: border-color .2s, background .2s;
}
.ss-radio:has(input:checked) {
  border-color: #c500d7;
  background: rgba(197,0,215,.08);
}
.ss-radio input[type="radio"] {
  accent-color: #c500d7;
  width: 16px;
  height: 16px;
}
.ss-save {
  font-size: .72rem;
  font-weight: 700;
  background: rgba(197,0,215,.2);
  color: #c500d7;
  padding: .15em .45em;
  border-radius: 4px;
  margin-left: .25rem;
}

/* ── Modal Button ──────────────────────────────────────────────── */
.ss-modal-btn {
  display: block;
  width: 100%;
  padding: .85rem;
  background: linear-gradient(135deg, #410576, #4107b4, #c500d7);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  margin-top: 1.25rem;
  transition: opacity .2s, transform .2s;
}
.ss-modal-btn:hover:not(:disabled) {
  opacity: .92;
  transform: translateY(-1px);
}
.ss-modal-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ── Messages ──────────────────────────────────────────────────── */
.ss-msg {
  font-size: .85rem;
  padding: 0;
  margin-bottom: .5rem;
  min-height: 1.2em;
}
.ss-msg:empty { display: none; }
.ss-msg-error { color: #f87171; }
.ss-msg-ok { color: #34d399; }

.ss-modal-footer {
  text-align: center;
  font-size: .82rem;
  color: #AFAFC4;
  margin-top: 1rem;
}
.ss-modal-footer a {
  color: #c500d7;
  text-decoration: none;
}
.ss-modal-footer a:hover {
  text-decoration: underline;
}

/* ── Mobile ────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .ss-modal-box {
    margin: 16px;
    padding: 2rem 1.5rem;
    border-radius: 16px;
  }
}
