/* Corporate Accounts — Frontend (My Account) Styles */

.cawwf-signup-url {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 20px;
  flex-wrap: wrap;
}

.cawwf-signup-url-input {
  flex: 1;
  min-width: 220px;
  font-size: 13px;
  background: #f9f9f9;
  border: 1px solid #ddd !important;
  padding: 8px 10px !important;
  border-radius: 3px !important;
}

.cawwf-add-sub {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 16px;
  margin: 20px 0;
}

.cawwf-add-sub h3 { margin-top: 0; }

.cawwf-csv-section {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 16px;
  margin: 20px 0;
}

.cawwf-csv-section label {
  margin-left: 6px;
  margin-right: 14px;
}

.cawwf-fe-table {
  font-size: 14px;
}

.cawwf-fe-table th,
.cawwf-fe-table td {
  vertical-align: middle !important;
}

.cawwf-transfer-section {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 16px;
  margin: 20px 0;
}

.cawwf-transfer-section h3 { margin-top: 0; }

#cawwf-fe-result,
#cawwf-fe-import-result,
#cawwf-fe-transfer-result {
  margin-top: 10px;
}

#cawwf-fe-search {
  margin-bottom: 10px;
  width: 260px;
}

/* Tabs (frontend) */
.cawwf-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--wc-red, #cc0000);
  margin-bottom: 14px;
}

.cawwf-tab {
  background: #f0f0f1;
  border: 1px solid #ddd;
  border-bottom: none;
  padding: 7px 18px;
  cursor: pointer;
  font-size: 13px;
  border-radius: 3px 3px 0 0;
  margin-right: 2px;
  transition: background 0.15s;
}

.cawwf-tab.active {
  background: #fff;
  color: #cc0000;
  font-weight: 600;
  border-bottom: 2px solid #fff;
}

.cawwf-tab-panel { padding: 10px 0; }

/* Seat management */
.cawwf-seat-management {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 16px;
  margin: 20px 0;
}

.cawwf-seat-management h3 { margin-top: 0; }

.cawwf-seat-counts {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.cawwf-seat-stat { font-size: 15px; }

.cawwf-seat-divider { color: #aaa; font-size: 18px; }

.cawwf-seats-available {
  margin-left: 10px;
  color: #46b450;
}

.cawwf-seat-bar {
  background: #e0e0e0;
  border-radius: 3px;
  height: 8px;
  margin: 6px 0 14px;
  overflow: hidden;
}

.cawwf-seat-bar-fill {
  background: #46b450;
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

.cawwf-seat-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cawwf-remove-seats-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cawwf-remove-seats-wrap input[type="number"] {
  width: 65px !important;
}

#cawwf-seat-result { margin-top: 10px; }

/* ── Role badges (Feature 1) ── */
.cawwf-role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.cawwf-role-manager {
  background: #d4edda;
  color: #155724;
}

.cawwf-role-member {
  background: #e9ecef;
  color: #555;
}

/* ── Bulk actions bar (Feature 4) ── */
.cawwf-bulk-bar {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Analytics dashboard (Feature 8) ── */
.cawwf-analytics-cards {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 16px 0 24px;
}

.cawwf-analytics-card {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 16px 20px;
  min-width: 120px;
  text-align: center;
  flex: 1;
}

.cawwf-analytics-card.cawwf-analytics-warning {
  background: #fff8e1;
  border-color: #ffc107;
}

.cawwf-analytics-num {
  display: block;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: #333;
}

.cawwf-analytics-label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

/* Mini activity bar */
.cawwf-mini-bar {
  background: #e0e0e0;
  border-radius: 3px;
  height: 6px;
  width: 80px;
  overflow: hidden;
}

.cawwf-mini-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: #46b450;
  transition: width 0.3s;
}

.cawwf-mini-bar-fill.cawwf-inactive { background: #f0a500; }
.cawwf-mini-bar-fill.cawwf-never    { background: #dc3545; }

/* Activity text indicators */
.cawwf-recent   { color: #46b450; }
.cawwf-moderate { color: #f0a500; }
.cawwf-inactive { color: #dc3545; }
.cawwf-never    { color: #999; }

/* ── GamiPress analytics (Feature 9) ── */
.cawwf-analytics-card.cawwf-analytics-gamipress {
  background: #f0f4ff;
  border-color: #7c8cf8;
}

.cawwf-gamipress-highlights {
  margin: 0 0 24px;
}

.cawwf-gamipress-heading {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #444;
  margin: 0 0 10px;
}

.cawwf-gamipress-highlight-cards {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.cawwf-gamipress-highlight-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0f4ff;
  border: 1px solid #7c8cf8;
  border-radius: 6px;
  padding: 12px 16px;
  flex: 1;
  min-width: 200px;
  font-size: 13px;
}

.cawwf-gamipress-highlight-icon {
  font-size: 22px;
  line-height: 1;
  color: #7c8cf8;
}

.cawwf-gamipress-points-badge,
.cawwf-gamipress-achieve-badge {
  display: inline-block;
  background: #7c8cf8;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: middle;
}

.cawwf-gamipress-achieve-badge {
  background: #f0a500;
}

.cawwf-gamipress-zero {
  color: #bbb;
}

/* ── Buy seats panel ── */
.cawwf-buy-seats-wrap {
  margin: 14px 0 6px;
}

.cawwf-buy-seats-wrap h4 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #555;
}

.cawwf-buy-seats-item {
  background: #eaf4ea;
  border: 1px solid #b8dfb8;
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.cawwf-buy-seats-item-info {
  margin-bottom: 8px;
}

.cawwf-buy-seats-item-info strong {
  display: block;
  font-size: 14px;
}

.cawwf-buy-seats-pack-info {
  font-size: 13px;
  color: #555;
}

.cawwf-buy-seats-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cawwf-buy-seats-qty-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.cawwf-buy-seats-qty-label input[type="number"] {
  width: 65px !important;
}

.cawwf-add-seats-preview {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

@media (max-width: 600px) {
  .cawwf-buy-seats-controls { flex-direction: column; align-items: flex-start; }
}

/* ── Edit name section ── */
.cawwf-edit-name-section {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 16px;
  margin: 20px 0;
}

.cawwf-edit-name-section h3 { margin-top: 0; }

@media (max-width: 600px) {
  .cawwf-fe-table { font-size: 12px; }
  .cawwf-signup-url { flex-direction: column; align-items: flex-start; }
  .cawwf-signup-url-input { width: 100%; }
  .cawwf-seat-actions { flex-direction: column; align-items: flex-start; }
  .cawwf-analytics-cards { flex-direction: column; }
}
