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

/* ===== Settings Container ===== */
.settings-container {
  max-width: 800px;
  margin: 0 auto;
}

/* ===== Settings Sections ===== */
.settings-section {
  background: var(--bo-surface);
  border: 1px solid var(--bo-border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bo-border);
}

.settings-section-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-section-icon.grape {
  background: rgba(107, 63, 160, 0.1);
  color: var(--victor-grape);
}

.settings-section-icon.coral {
  background: rgba(255, 107, 91, 0.1);
  color: var(--victor-coral);
}

.settings-section-icon.wine {
  background: rgba(139, 34, 82, 0.1);
  color: var(--victor-wine);
}

.settings-section-icon.gold {
  background: rgba(212, 175, 55, 0.1);
  color: var(--victor-gold);
}

.settings-section-title-group {
  flex: 1;
}

.settings-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--bo-text);
  margin-bottom: 2px;
}

.settings-section-subtitle {
  font-size: 13px;
  color: var(--bo-text-muted);
}

/* ===== Form Styles ===== */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--bo-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-label-optional {
  font-weight: 400;
  text-transform: none;
  color: var(--bo-text-muted);
}

.form-input,
.form-textarea {
  padding: 14px 16px;
  border: 1px solid var(--bo-border);
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  color: var(--bo-text);
  background: var(--bo-surface);
  transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--victor-grape);
  box-shadow: 0 0 0 3px rgba(107, 63, 160, 0.1);
}

.form-input:disabled {
  background: var(--bo-bg);
  color: var(--bo-text-muted);
  cursor: not-allowed;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 12px;
  color: var(--bo-text-muted);
  margin-top: 4px;
}

/* ===== Logo Upload ===== */
.logo-upload {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.logo-preview {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(107, 63, 160, 0.1), rgba(255, 107, 91, 0.1));
  border: 2px dashed var(--bo-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bo-text-muted);
  flex-shrink: 0;
  overflow: hidden;
}

.logo-preview.has-logo {
  border-style: solid;
  background: var(--bo-bg);
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-upload-content {
  flex: 1;
}

.logo-upload-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--bo-text);
  margin-bottom: 4px;
}

.logo-upload-text {
  font-size: 13px;
  color: var(--bo-text-muted);
  margin-bottom: 12px;
}

.logo-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bo-bg);
  border: 1px solid var(--bo-border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--bo-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.logo-upload-btn:hover {
  border-color: var(--victor-grape);
  color: var(--victor-grape);
  background: rgba(107, 63, 160, 0.05);
}

.hidden-file-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ===== Toggle Option ===== */
.toggle-option {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--bo-bg);
  border-radius: 12px;
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  background: var(--bo-border);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.toggle-switch.active {
  background: var(--victor-grape);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.toggle-switch.active::after {
  left: 26px;
}

.toggle-content {
  flex: 1;
}

.toggle-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--bo-text);
  margin-bottom: 4px;
}

.toggle-description {
  font-size: 13px;
  color: var(--bo-text-secondary);
  line-height: 1.5;
}

/* ===== Change Password Button ===== */
.change-password-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bo-bg);
  border: 1px solid var(--bo-border);
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--bo-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.change-password-btn:hover {
  border-color: var(--victor-grape);
  color: var(--victor-grape);
  background: rgba(107, 63, 160, 0.05);
}

/* ===== Input with Edit Button ===== */
.input-with-button {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.input-with-button .form-input {
  flex: 1;
}

.input-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  background: var(--bo-bg);
  border: 1px solid var(--bo-border);
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--bo-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.input-edit-btn:hover {
  border-color: var(--victor-grape);
  color: var(--victor-grape);
  background: rgba(107, 63, 160, 0.05);
}

/* ===== Subscription Card ===== */
.subscription-card {
  background: linear-gradient(135deg, rgba(107, 63, 160, 0.08), rgba(255, 107, 91, 0.05));
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.subscription-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, transparent, rgba(107, 63, 160, 0.1));
  border-radius: 50%;
  transform: translate(50%, -50%);
}

.subscription-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
}

.subscription-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.subscription-status.trial {
  background: rgba(255, 193, 7, 0.15);
  color: #D97706;
}

.subscription-status.active {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.subscription-status.cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: #DC2626;
}

.subscription-price {
  font-size: 13px;
  color: var(--bo-text-muted);
  position: relative;
}

.subscription-price strong {
  font-size: 24px;
  font-weight: 700;
  color: var(--bo-text);
}

.subscription-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.subscription-detail {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--bo-text-secondary);
}

.subscription-detail svg {
  color: var(--victor-grape);
  flex-shrink: 0;
}

.subscription-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(107, 63, 160, 0.1);
  font-size: 13px;
  color: var(--bo-text-muted);
  position: relative;
}

.subscription-footer a {
  color: var(--victor-grape);
  text-decoration: none;
  font-weight: 600;
}

.subscription-footer a:hover {
  text-decoration: underline;
}

/* ===== Form Actions ===== */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--bo-border);
  margin-top: 24px;
}



/* ===== Modal Styles ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bo-surface);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.open .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--bo-border);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--bo-text);
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--bo-text-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--bo-bg);
  color: var(--bo-text);
}

.modal-body {
  padding: 24px;
}

.modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--bo-text-muted);
}

.modal-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--bo-border);
  border-top-color: var(--victor-grape);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ===== Password Change Form ===== */
.password-change-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.password-form-errors {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  color: #DC2626;
  font-size: 14px;
}

.password-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.password-form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--bo-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.password-form-input {
  padding: 14px 16px;
  border: 1px solid var(--bo-border);
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  color: var(--bo-text);
  background: var(--bo-surface);
  transition: all 0.2s ease;
}

.password-form-input:focus {
  outline: none;
  border-color: var(--victor-grape);
  box-shadow: 0 0 0 3px rgba(107, 63, 160, 0.1);
}

.password-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.password-btn-cancel {
  flex: 1;
  padding: 14px 20px;
  background: var(--bo-bg);
  border: 1px solid var(--bo-border);
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--bo-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.password-btn-cancel:hover {
  border-color: var(--bo-border-hover);
  background: var(--bo-border);
}

.password-btn-submit {
  flex: 1;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--victor-grape), var(--victor-grape-light));
  border: none;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.password-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(107, 63, 160, 0.3);
}

/* ===== Password Success ===== */
.password-success {
  text-align: center;
  padding: 20px 0;
}

.password-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.password-success-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--bo-text);
  margin: 0 0 8px;
}

.password-success-text {
  font-size: 14px;
  color: var(--bo-text-secondary);
  margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .logo-upload {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .subscription-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .form-actions {
    flex-direction: column;
  }


  .password-form-actions {
    flex-direction: column;
  }

  .input-with-button {
    flex-direction: column;
  }

  .input-edit-btn {
    padding: 12px 16px;
    justify-content: center;
  }
}
