/* WC Frontend Portal styles */
:root {
  --wcfp-bg: #f7f7f8;
  --wcfp-surface: #ffffff;
  --wcfp-border: #e5e7eb;
  --wcfp-text: #111827;
  --wcfp-muted: #6b7280;
  --wcfp-primary: #111827;
  --wcfp-accent: #2563eb;
  --wcfp-sidebar-width: 240px;
  --wcfp-header-height: 64px;
  --wcfp-radius: 16px;
  --wcfp-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.wcfp * { box-sizing: border-box; }
.wcfp {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--wcfp-text);
}

html { scroll-behavior: auto !important; }

#wcfp-categories-table td img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

#wcfp-categories-table .toggle-status-dropdown {
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 6px;
  border: none;
  background-color: #333;
  color: #fff;
}


/* General card style */
.wcfp-card,
.wcfp-card-header {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 16px 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Card header layout */
.wcfp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
}

/* Card title */
.wcfp-card-header .wcfp-title {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  margin: 0;
}

/* Primary buttons */
.wcfp-save-category,
.wcfp-add-category,
.wcfp-add-product {
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.wcfp-save-category:hover,
.wcfp-add-category:hover,
.wcfp-add-product:hover {
  background: #005f8d;
}

/* Header */
.wcfp-header {
  position: relative;
  height: var(--wcfp-header-height);
  background: #2B1B17;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
}
.wcfp-header .title {
  font-weight: 800;
  font-size: 20px;
  color: #fff;
}
.wcfp-admin { position: relative; }
.wcfp-admin-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--wcfp-border);
  background: var(--wcfp-surface);
  padding: 8px 12px;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: var(--wcfp-shadow);
}
.wcfp-admin-button .dashicons { font-size: 18px; }
.wcfp-admin-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 160px;
  background: var(--wcfp-surface);
  border: 1px solid var(--wcfp-border);
  border-radius: 12px;
  box-shadow: var(--wcfp-shadow);
  padding: 6px;
  display: none;
}
.wcfp-admin-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--wcfp-text);
}
.wcfp-admin-menu a:hover { background: var(--wcfp-bg); }

/* Body layout */
.wcfp-body {
  display: grid;
  grid-template-columns: var(--wcfp-sidebar-width) 1fr;
  min-height: calc(100vh - var(--wcfp-header-height));
  background: var(--wcfp-bg);
}

/* Sidebar */
.wcfp-sidebar {
  background: #0f172a;
  color: #fff;
  padding: 16px 8px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.wcfp-nav { list-style: none; margin: 0; padding: 0; }
.wcfp-nav li {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
}
.wcfp-nav li:hover { background: rgba(255,255,255,0.12); }
.wcfp-nav li.active { background: #98AFC7; }

/* Content */
.wcfp-content { padding: 20px; }

/* Breadcrumb base */
.wcfp-breadcrumb {
  font-size: 14px;
  color: var(--wcfp-muted);
  margin-bottom: 10px;
}

/* Links (all except last item) */
.wcfp-breadcrumb .breadcrumb-link {
  color: var(--wcfp-muted);
  cursor: pointer;
  text-decoration: none;
}

.wcfp-breadcrumb .breadcrumb-link:hover {
  color: #2563eb; /* blue hover */
  text-decoration: underline;
}

/* Last breadcrumb item (active page) */
.wcfp-breadcrumb span:last-child {
  color: #2563eb;   /* blue text for current location */
  font-weight: 600; /* make it stand out */
  cursor: default;
}


.wcfp-heading {
  margin: 0 0 16px 0;
  font-size: 28px;
  font-weight: 800;
  color: #111827;
}

/* Cards / Buttons grid */
.wcfp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.wcfp-btn-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--wcfp-radius);
  background: var(--wcfp-surface);
  border: 1px solid var(--wcfp-border);
  box-shadow: var(--wcfp-shadow);
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease;
  text-align: center;
}
.wcfp-btn-card:hover { background: #f3f4f6; transform: translateY(-2px); }
.wcfp-btn-card:active { transform: translateY(1px); }

/* Views */
.wcfp-view { display: none; }
.wcfp-view.active { display: block; }

/* Placeholder */
.wcfp-placeholder {
  background: var(--wcfp-surface);
  border: 1px solid var(--wcfp-border);
  border-radius: var(--wcfp-radius);
  padding: 24px;
  box-shadow: var(--wcfp-shadow);
}

/* Category filter dropdown */
#wcfp-category-filter {
  display: inline-block;
  padding: 7px 10px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  height: 36px;
  font-size: 14px;
  background: #fff;
  margin-bottom: 10px;
  margin-right: 12px;
  min-width: 180px;
  max-width: 260px;
}

/* Toast + Modal */
.wcfp-toast {
  background: #333;
  color: #fff;
  padding: 10px 15px;
  border-radius: 4px;
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  z-index: 10000;
}
#wcfp-confirmation-modal {
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.5);
  z-index:9999;
  text-align:center;
}
#wcfp-confirmation-modal > div {
  background:#fff;
  padding:20px;
  margin:15% auto;
  width:300px;
  border-radius:8px;
}

/* Forms */
.wcfp-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 30px;
  margin-top: 16px;
}
.wcfp-form-group {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.wcfp-form-group label {
  margin-bottom: 6px;
  font-weight: 600;
  color: #333;
}
.wcfp-form-group input,
.wcfp-form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}
.wcfp-form-group input[type="file"] { padding: 6px; }

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

/* Style for Edit button */
#wcfp-categories-table .edit-category {
  background: #0073aa;
  border: none;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

#wcfp-categories-table .edit-category:hover {
  background: #005f8d;
}

#wcfp-categories-table .edit-category .dashicons {
  font-size: 16px;
  line-height: 1;
}

/* Bigger select dropdown for status */
#wcfp-categories-table .toggle-status-dropdown {
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 6px;
  border: none;
  background-color: #333;  /* black background */
  color: #fff;             /* white text */
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Hover effect */
#wcfp-categories-table .toggle-status-dropdown:hover {
  background-color: #222; /* dark gray */
}

/* Different colors depending on value */
#wcfp-categories-table .toggle-status-dropdown[data-current="active"] {
  background-color: #28a745; /* green */
  color: #fff;
}

#wcfp-categories-table .toggle-status-dropdown[data-current="hidden"] {
  background-color: #dc3545; /* red */
  color: #fff;
}

/* Fix DataTables processing overlay */
.dataTables_processing {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(0, 0, 0, 0.3); /* dark semi-transparent overlay */
  border: none !important;
  box-shadow: none !important;
  z-index: 9999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dataTables_processing:after {
  content: "Loading…" !important;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
}

