/* ============================================================================
 * Settings Page Styles
 * ============================================================================ */

/* Ensure HTML and body take full width/height */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

.settings-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background:
    linear-gradient(180deg, #f7faf9 0%, #eef4f2 54%, #f4f7f6 100%);
}

.settings-container {
  flex: 1;
  overflow-y: auto;
  padding: 36px 28px 48px;
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* ============================================================================
 * Settings Header
 * ============================================================================ */
.settings-header {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
  text-align: left;
}

.settings-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 750;
  color: #2c3e50;
  letter-spacing: 0;
}

.settings-subtitle {
  margin: 0;
  font-size: 1rem;
  color: #667789;
}

/* ============================================================================
 * Settings Cards
 * ============================================================================ */
.settings-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-card {
  position: relative;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  border-color: #d9e2ea;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 252, 253, 0.98) 100%);
  box-shadow: 0 8px 22px rgba(44, 62, 80, 0.07);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.settings-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: #8fa3b7;
}

.settings-card:hover {
  border-color: #c1cfdb;
  box-shadow: 0 12px 28px rgba(44, 62, 80, 0.1);
  transform: translateY(-1px);
}

.settings-card-header {
  display: flex;
  align-items: center;
  min-height: 122px;
  padding: 22px;
  gap: 18px;
}

.settings-card-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid rgba(44, 62, 80, 0.1);
  background: #edf2f6;
  color: #2c3e50;
}

.settings-card-icon::before,
.settings-card-icon::after {
  content: "";
  position: absolute;
  display: block;
}

.settings-card-icon-profile {
  background: linear-gradient(180deg, #f6f8fb 0%, #e7eef5 100%);
}

.settings-card-icon-profile::before {
  width: 13px;
  height: 13px;
  top: 11px;
  border-radius: 50%;
  background: #2c3e50;
}

.settings-card-icon-profile::after {
  width: 26px;
  height: 13px;
  bottom: 10px;
  border-radius: 14px 14px 7px 7px;
  background: #2c3e50;
}

.settings-card-icon-mindvoice {
  background: linear-gradient(180deg, #f9fbfc 0%, #eaf1f4 100%);
}

.settings-card-icon-mindvoice::before {
  width: 28px;
  height: 20px;
  border: 2px solid #3a596f;
  border-radius: 14px;
}

.settings-card-icon-mindvoice::after {
  width: 8px;
  height: 8px;
  right: 12px;
  bottom: 12px;
  border-right: 2px solid #3a596f;
  border-bottom: 2px solid #3a596f;
  transform: rotate(32deg);
}

.settings-card-icon-subscription {
  background: linear-gradient(180deg, #f4fbf8 0%, #e1f1eb 100%);
}

.settings-card-icon-subscription::before {
  width: 29px;
  height: 20px;
  border-radius: 5px;
  background: #2f7d62;
  box-shadow: inset 0 -11px 0 rgba(255, 255, 255, 0.86);
}

.settings-card-icon-subscription::after {
  width: 18px;
  height: 2px;
  left: 15px;
  bottom: 17px;
  background: #2f7d62;
  box-shadow: 0 5px 0 #2f7d62;
}

.settings-card-icon-logout {
  background: linear-gradient(180deg, #fff7f6 0%, #fdebea 100%);
}

.settings-card-icon-logout::before {
  width: 18px;
  height: 26px;
  border: 2px solid #c9433b;
  border-radius: 4px;
}

.settings-card-icon-logout::after {
  width: 16px;
  height: 2px;
  right: 10px;
  background: #c9433b;
  box-shadow: 5px -5px 0 -1px #c9433b, 5px 5px 0 -1px #c9433b;
}

.settings-card-info {
  flex: 1;
  min-width: 0;
}

.settings-card-title {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 750;
  color: #2c3e50;
  letter-spacing: 0;
}

.settings-card-desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #657385;
}

#paymentStatusText {
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef5f1;
  color: #315d4b;
  font-size: 0.82rem;
  font-weight: 650;
}

.settings-email-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.settings-email-label {
  color: #7a8796;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.settings-email-status {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2f6;
  color: #4f6376;
  font-size: 0.82rem;
  font-weight: 650;
}

.settings-email-status-verified {
  background: #eef5f1;
  color: #315d4b;
}

.settings-email-status-unverified {
  background: #fff6e7;
  color: #7a4d13;
}

.settings-email-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: #2c3e50;
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.settings-email-action:hover:not(:disabled) {
  background: transparent;
  color: #1d2b3a;
}

.settings-email-action:disabled {
  color: #95a5a6;
  cursor: wait;
}

.settings-card .lc-btn {
  min-width: 86px;
  border-radius: 8px;
  font-weight: 700;
  box-shadow: none;
}

.settings-card .lc-btn-secondary {
  background: #ffffff;
  border-color: #cfd9e3;
  color: #2c3e50;
}

.settings-card .lc-btn-secondary:hover:not(:disabled) {
  background: #f4f8fb;
  border-color: #aebfce;
}

.settings-card .lc-btn-danger {
  background: #dc4c43;
  border-color: #dc4c43;
}

/* Logout card special styling */
.settings-card-logout {
  border-color: #f0ccc9;
}

.settings-card-logout::before {
  background: #e74c3c;
}

.settings-card-profile::before {
  background: #4f6b8a;
}

.settings-card-mindvoice::before {
  background: #7893a3;
}

.settings-card-subscription::before {
  background: #2f7d62;
}

/* ============================================================================
 * Responsive
 * ============================================================================ */
@media (max-width: 760px) {
  .settings-container {
    padding: 22px 14px 32px;
  }

  .settings-sections {
    grid-template-columns: 1fr;
  }

  .settings-card-header {
    align-items: flex-start;
    min-height: 0;
    padding: 16px;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .settings-title {
    font-size: 1.5rem;
  }

  .settings-card-header .lc-btn {
    width: 100%;
    margin-top: 12px;
  }
}
