/**
 * GK My Account — Озон/Самокат-style sidebar + dashboard.
 * Грузится через плагин gk-filter-core на is_account_page().
 */

/* === Layout === */
.gk-account-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  margin-top: 16px;
}
@media (max-width: 768px) {
  .gk-account-layout { grid-template-columns: 1fr; gap: 0; }
}

/* === Sidebar === */
.gk-account-sidebar {
  position: sticky; top: 16px;
  align-self: start;
}
.gk-account-nav {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px;
}
.gk-account-nav-list { list-style: none; margin: 0; padding: 0; }
.gk-account-nav-item { margin: 0; }
.gk-account-nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  color: #374151;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.gk-account-nav-link:hover { background: #f3f4f6; color: #111; }
.gk-account-nav-item.is-active .gk-account-nav-link {
  background: rgba(200,169,110,0.12);
  color: var(--color-brand, #b08b4d);
}
.gk-account-nav-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.gk-account-nav-icon svg { width: 100%; height: 100%; }
.gk-account-nav-label { flex: 1; }
.gk-account-nav-count {
  background: var(--color-brand, #c8a96e);
  color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
}
.gk-account-nav-count[data-empty-hidden="1"]:empty,
.gk-account-nav-count.hidden { display: none; }

/* === Mobile: sidebar → horizontal tab-bar === */
@media (max-width: 768px) {
  .gk-account-sidebar { position: static; margin-bottom: 12px; }
  .gk-account-nav {
    padding: 6px;
    border-radius: 12px;
  }
  .gk-account-nav-list {
    display: flex; gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .gk-account-nav-list::-webkit-scrollbar { display: none; }
  .gk-account-nav-link {
    flex-direction: column; gap: 4px;
    padding: 8px 10px;
    font-size: 11px;
    min-width: 76px;
    text-align: center;
    position: relative;
  }
  .gk-account-nav-icon { width: 22px; height: 22px; }
  .gk-account-nav-label { font-size: 11px; line-height: 1.2; }
  .gk-account-nav-count {
    position: absolute; top: 4px; right: 8px;
    font-size: 10px;
    padding: 0 5px;
    min-width: 16px;
  }
}

/* === Dashboard === */
.gk-account-hero {
  background: linear-gradient(135deg, #fdf6e8, #fff);
  border: 1px solid #f3e7c8;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 20px;
}
.gk-account-hero-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 6px;
  color: #1f2937;
  line-height: 1.2;
}
.gk-account-hero-sub {
  margin: 0; font-size: 14px; color: #6b7280;
}

.gk-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.gk-account-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  display: flex; flex-direction: column;
}
.gk-account-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.gk-account-card-title {
  font-size: 16px; font-weight: 700;
  margin: 0; color: #111;
}
.gk-account-card-link {
  font-size: 13px;
  color: var(--color-brand, #b08b4d);
  text-decoration: none;
}
.gk-account-card-link:hover { text-decoration: underline; }
.gk-account-card-text {
  font-size: 14px; color: #6b7280; line-height: 1.5;
  margin: 0 0 16px;
}
.gk-account-card-text--muted { font-size: 12px; color: #9ca3af; margin-top: auto; margin-bottom: 0; }

.gk-account-card--cta {
  background: linear-gradient(135deg, #fdf6e8, #fff);
  border-color: #f3e7c8;
}

.gk-account-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  border: 0; cursor: pointer;
  transition: background .15s, transform .1s;
  text-align: center;
}
.gk-account-btn--primary {
  background: var(--color-brand, #c8a96e);
  color: #fff;
  box-shadow: 0 2px 8px rgba(200,169,110,0.3);
}
.gk-account-btn--primary:hover { background: var(--color-brand-dark, #b08b4d); color: #fff; }
.gk-account-btn--secondary {
  background: #f3f4f6;
  color: #374151;
}
.gk-account-btn--secondary:hover { background: #e5e7eb; color: #111; }

/* === Order block === */
.gk-account-order { display: flex; flex-direction: column; gap: 10px; }
.gk-account-order-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
  color: #374151;
}
.gk-account-order-label { color: #9ca3af; }
.gk-account-order-number {
  color: var(--color-brand, #b08b4d);
  font-weight: 600;
  text-decoration: none;
}
.gk-account-order-number:hover { text-decoration: underline; }
.gk-account-order-row--total {
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
  margin-top: 4px;
}
.gk-account-order-total { font-weight: 700; font-size: 16px; color: #111; }

.gk-order-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f3f4f6;
  color: #6b7280;
}
.gk-order-status--processing,
.gk-order-status--pending  { background: #fef3c7; color: #92400e; }
.gk-order-status--completed { background: #d1fae5; color: #065f46; }
.gk-order-status--cancelled,
.gk-order-status--failed   { background: #fee2e2; color: #991b1b; }
.gk-order-status--on-hold  { background: #dbeafe; color: #1e40af; }

.gk-account-order .gk-account-btn { margin-top: 12px; }

/* === Empty state === */
.gk-account-empty {
  text-align: center;
  padding: 24px 12px;
}
.gk-account-empty p {
  margin: 0 0 14px;
  color: #6b7280;
}

/* === Zones === */
.gk-account-zones {
  list-style: none; padding: 0; margin: 0 0 12px;
  display: flex; flex-direction: column; gap: 12px;
}
.gk-account-zones li {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px;
  background: #f9fafb;
  border-radius: 8px;
}
.gk-account-zones strong { font-size: 14px; color: #111; font-weight: 600; }
.gk-account-zones span { font-size: 12px; color: #6b7280; }

/* === Скрываем дефолтные wc messages если хочется ===
   (НЕ скрываем wc-notices-wrapper — там валидация формы) */

/* === WC default forms внутри content — мягко стилизуем === */
.woocommerce-MyAccount-content table.shop_table {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 14px;
}
.woocommerce-MyAccount-content table.shop_table th,
.woocommerce-MyAccount-content table.shop_table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
}
.woocommerce-MyAccount-content table.shop_table th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
}
.woocommerce-MyAccount-content .button {
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
}
