/**
 * Banana Marche Manager - Vendor Frontend Styles
 * Warm, organic aesthetic for marche (market) experience
 */

@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

/* ===== Design Tokens ===== */
:root {
  --bmm-font: 'Zen Kaku Gothic New', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bmm-bg: #f8f6f2;
  --bmm-bg-card: #ffffff;
  --bmm-border: #e8e4dc;
  --bmm-border-focus: #b8a99a;
  --bmm-text: #2d2a26;
  --bmm-text-muted: #6b6661;
  --bmm-primary: #c45c3e;
  --bmm-primary-hover: #a84a30;
  --bmm-primary-light: rgba(196, 92, 62, 0.08);
  --bmm-success: #2d6a4f;
  --bmm-success-bg: #e8f5e9;
  --bmm-warning: #b45309;
  --bmm-warning-bg: #fff8e1;
  --bmm-info: #1e5f74;
  --bmm-info-bg: #e3f2fd;
  --bmm-danger: #b91c1c;
  --bmm-danger-bg: #fef2f2;
  --bmm-radius: 12px;
  --bmm-radius-sm: 8px;
  --bmm-shadow: 0 4px 24px rgba(45, 42, 38, 0.06);
  --bmm-shadow-hover: 0 8px 32px rgba(45, 42, 38, 0.1);
  --bmm-transition: 0.2s ease;
}

/* ===== Page Wrapper (Login, Register, MyPage) ===== */
.bmm-vendor-page {
  min-height: 60vh;
  padding: 48px 24px 64px;
  background: linear-gradient(165deg, var(--bmm-bg) 0%, #f0ebe3 100%);
  font-family: var(--bmm-font);
}

.bmm-vendor-page * {
  box-sizing: border-box;
}

/* ===== Login Form ===== */
.bmm-login-wrapper {
  max-width: 420px;
  margin: 0 auto;
}

.bmm-login-card {
  background: var(--bmm-bg-card);
  border-radius: var(--bmm-radius);
  box-shadow: var(--bmm-shadow);
  padding: 40px;
  border: 1px solid var(--bmm-border);
}

.bmm-login-card h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bmm-text);
  letter-spacing: 0.02em;
}

.bmm-login-card .bmm-login-subtitle {
  margin: 0 0 28px;
  font-size: 0.9rem;
  color: var(--bmm-text-muted);
}

.bmm-login-form .bmm-field {
  margin-bottom: 20px;
}

.bmm-login-form .bmm-field:last-of-type {
  margin-bottom: 0;
}

.bmm-login-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--bmm-text);
  margin-bottom: 8px;
}

.bmm-login-form input[type="text"],
.bmm-login-form input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--bmm-border);
  border-radius: var(--bmm-radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bmm-bg-card);
  color: var(--bmm-text);
  transition: border-color var(--bmm-transition), box-shadow var(--bmm-transition);
}

.bmm-login-form input:focus {
  outline: none;
  border-color: var(--bmm-border-focus);
  box-shadow: 0 0 0 3px var(--bmm-primary-light);
}

.bmm-login-form .bmm-field-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 28px;
}

.bmm-login-form .bmm-field-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--bmm-primary);
}

.bmm-login-form .bmm-field-checkbox label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.bmm-login-form .bmm-submit {
  width: 100%;
  padding: 14px 24px;
  background: var(--bmm-primary);
  color: #fff !important;
  border: none;
  border-radius: var(--bmm-radius-sm);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--bmm-transition), transform 0.05s;
}

.bmm-login-form .bmm-submit:hover {
  background: var(--bmm-primary-hover);
}

.bmm-login-form .bmm-submit:active {
  transform: translateY(1px);
}

/* ===== Registration Form ===== */
.bmm-registration-form,
.bmm-registration-complete {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  font-family: var(--bmm-font);
}

.bmm-registration-form .bmm-card,
.bmm-registration-complete .bmm-card {
  background: var(--bmm-bg-card);
  border-radius: var(--bmm-radius);
  box-shadow: var(--bmm-shadow);
  padding: 40px;
  border: 1px solid var(--bmm-border);
}

.bmm-registration-form h2,
.bmm-registration-complete h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bmm-text);
  letter-spacing: 0.02em;
}

.bmm-registration-complete h2 {
  margin-bottom: 16px;
}

.bmm-registration-complete p {
  margin: 0 0 12px;
  color: var(--bmm-text-muted);
  line-height: 1.7;
}

.bmm-registration-complete a {
  color: var(--bmm-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--bmm-transition);
}

.bmm-registration-complete a:hover {
  color: var(--bmm-primary-hover);
}

/* ===== Form Grid & Fields ===== */
.bmm-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

@media (max-width: 640px) {
  .bmm-form-grid {
    grid-template-columns: 1fr;
  }
}

.bmm-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bmm-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bmm-text);
}

.bmm-field input[type="text"],
.bmm-field input[type="email"],
.bmm-field input[type="password"],
.bmm-field input[type="tel"],
.bmm-field input[type="number"],
.bmm-field input[type="url"],
.bmm-field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--bmm-border);
  border-radius: var(--bmm-radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bmm-bg-card);
  color: var(--bmm-text);
  transition: border-color var(--bmm-transition), box-shadow var(--bmm-transition);
}

.bmm-field textarea {
  min-height: 120px;
  resize: vertical;
}

.bmm-field input:focus,
.bmm-field textarea:focus {
  outline: none;
  border-color: var(--bmm-border-focus);
  box-shadow: 0 0 0 3px var(--bmm-primary-light);
}

.bmm-field input::placeholder,
.bmm-field textarea::placeholder {
  color: #9ca3af;
}

/* Full width field */
.bmm-field-full {
  grid-column: 1 / -1;
}

/* ===== Buttons ===== */
.bmm-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.bmm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--bmm-radius-sm);
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--bmm-transition), border-color var(--bmm-transition), transform 0.05s;
}

.bmm-button:active {
  transform: translateY(1px);
}

.bmm-button-primary {
  background: var(--bmm-primary);
  color: #fff !important;
  border-color: var(--bmm-primary);
}

.bmm-button-primary:hover {
  background: var(--bmm-primary-hover);
  border-color: var(--bmm-primary-hover);
}

.bmm-button-secondary {
  background: var(--bmm-bg-card);
  border-color: var(--bmm-border);
  color: var(--bmm-text) !important;
}

.bmm-button-secondary:hover {
  background: var(--bmm-bg);
  border-color: var(--bmm-border-focus);
}

/* ===== Alerts & Notices ===== */
.bmm-alert,
.bmm-notice,
.bmm-error {
  border-radius: var(--bmm-radius-sm);
  padding: 16px 20px;
  margin: 0 0 20px;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.bmm-alert-error,
.bmm-error {
  background: var(--bmm-danger-bg);
  border: 1px solid #fecaca;
  color: var(--bmm-danger);
}

.bmm-notice.bmm-warning {
  background: var(--bmm-warning-bg);
  border: 1px solid #fde68a;
  color: var(--bmm-warning);
}

.bmm-notice.bmm-info {
  background: var(--bmm-info-bg);
  border: 1px solid #90caf9;
  color: var(--bmm-info);
}

.bmm-notice.bmm-success {
  background: var(--bmm-success-bg);
  border: 1px solid #a5d6a7;
  color: var(--bmm-success);
}

/* ===== Badge ===== */
.bmm-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  background: var(--bmm-primary-light);
  color: var(--bmm-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-left: 8px;
  vertical-align: middle;
}

/* ===== My Page ===== */
.bmm-mypage {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  font-family: var(--bmm-font);
}

.bmm-mypage h2 {
  margin: 0 0 24px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bmm-text);
  letter-spacing: 0.02em;
}

.bmm-mypage .bmm-header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.bmm-mypage .bmm-header-actions .bmm-button {
  text-decoration: none;
}

/* ===== Sections ===== */
.bmm-section {
  background: var(--bmm-bg-card);
  border: 1px solid var(--bmm-border);
  border-radius: var(--bmm-radius);
  padding: 28px;
  margin: 0 0 24px;
  box-shadow: 0 2px 12px rgba(45, 42, 38, 0.04);
}

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

.bmm-section h3 {
  margin: 0 0 20px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--bmm-text);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bmm-border);
}

.bmm-section h4 {
  margin: 20px 0 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bmm-text-muted);
}

.bmm-section h4:first-child {
  margin-top: 0;
}

.bmm-section p,
.bmm-section .bmm-field {
  margin: 0 0 16px;
}

.bmm-section p:last-child,
.bmm-section .bmm-field:last-child {
  margin-bottom: 0;
}

.bmm-field-hint {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--bmm-text-muted);
}

.bmm-section hr {
  margin: 24px 0;
  border: none;
  border-top: 1px solid var(--bmm-border);
}

/* Section: QR Code */
.bmm-qrcode-section #bmm-qrcode {
  display: inline-block;
  padding: 16px;
  background: #fff;
  border-radius: var(--bmm-radius-sm);
  border: 1px solid var(--bmm-border);
  margin-bottom: 12px;
}

.bmm-qrcode-section #bmm-qrcode img {
  display: block;
}

.bmm-qrcode-section .bmm-qr-hint {
  font-size: 0.9rem;
  color: var(--bmm-text-muted);
  margin: 0 0 8px;
  line-height: 1.6;
}

.bmm-qrcode-section .bmm-qr-hint a {
  color: var(--bmm-primary);
  font-weight: 600;
  text-decoration: none;
}

.bmm-qrcode-section .bmm-qr-hint a:hover {
  text-decoration: underline;
}

/* Section: Edit Form - Radio/Checkbox groups */
.bmm-radio-group > label:first-of-type,
.bmm-checkbox-group > label:first-of-type,
.bmm-checkbox-inline > label:first-of-type {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  cursor: default;
}

.bmm-section .bmm-radio-group label:not(:first-of-type),
.bmm-section .bmm-checkbox-group label:not(:first-of-type) {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  font-weight: 400;
  cursor: pointer;
}

.bmm-section .bmm-checkbox-inline label:not(:first-of-type) {
  display: inline-flex;
  margin-right: 16px;
  margin-bottom: 8px;
}

.bmm-section .bmm-radio-group input[type="radio"],
.bmm-section .bmm-checkbox-group input[type="checkbox"],
.bmm-section .bmm-checkbox-inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--bmm-primary);
}

/* Section: File inputs */
.bmm-section input[type="file"] {
  padding: 10px;
  font-size: 0.875rem;
  border: 1px dashed var(--bmm-border);
  border-radius: var(--bmm-radius-sm);
  background: var(--bmm-bg);
  width: 100%;
  max-width: 400px;
}

/* Section: Read-only summary */
.bmm-readonly-summary p,
.bmm-readonly-summary div {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.bmm-readonly-summary strong {
  display: inline-block;
  min-width: 140px;
  color: var(--bmm-text-muted);
  font-weight: 500;
}

/* Settlement result box */
.bmm-settlement-box {
  margin-top: 16px;
  padding: 20px;
  background: var(--bmm-bg);
  border-radius: var(--bmm-radius-sm);
  border: 1px solid var(--bmm-border);
}

.bmm-settlement-box > div {
  margin: 0 0 8px;
  font-size: 0.9375rem;
}

.bmm-settlement-box > div:last-child {
  margin-bottom: 0;
}

/* ===== Activation Complete ===== */
.bmm-activation-complete {
  max-width: 520px;
  margin: 48px auto 64px;
  padding: 40px;
  background: var(--bmm-bg-card);
  border-radius: var(--bmm-radius);
  box-shadow: var(--bmm-shadow);
  border: 1px solid var(--bmm-border);
  font-family: var(--bmm-font);
}

.bmm-activation-complete h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bmm-text);
}

.bmm-activation-complete p {
  margin: 0 0 20px;
  color: var(--bmm-text-muted);
  line-height: 1.7;
}

.bmm-activation-complete .bmm-button {
  display: inline-block;
  padding: 14px 28px;
  text-decoration: none;
}

/* ===== WordPress Editor in forms ===== */
.bmm-section .wp-editor-container {
  border: 1px solid var(--bmm-border);
  border-radius: var(--bmm-radius-sm);
  overflow: hidden;
}

.bmm-section .wp-editor-wrap {
  border: none !important;
}

/* ===== Already logged in message ===== */
.bmm-already-logged-in {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px;
  background: var(--bmm-bg-card);
  border-radius: var(--bmm-radius);
  box-shadow: var(--bmm-shadow);
  border: 1px solid var(--bmm-border);
  font-family: var(--bmm-font);
  text-align: center;
}

.bmm-already-logged-in p {
  margin: 0 0 16px;
  color: var(--bmm-text-muted);
}

.bmm-already-logged-in a {
  color: var(--bmm-primary);
  font-weight: 600;
  text-decoration: none;
}

.bmm-already-logged-in a:hover {
  text-decoration: underline;
}

.bmm-already-logged-in .bmm-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
