/* =========================================================
 * GCC Credit Shop – no @import; safe to load anywhere
 * =======================================================*/
:root{
  --gcccs-radius:14px;
  --gcccs-border:#e5e7eb;
  --gcccs-ink:#111827;
  --gcccs-muted:#6b7280;
  --gcccs-bg:#ffffff;
  --gcccs-accent:#111827;
}

/* ---------- wrapper + header ---------- */
.gccqp-packages-wrapper{max-width:1100px;margin:0 auto;padding:8px 12px;color:var(--gcccs-ink)}
.gccqp-header{display:flex;justify-content:space-between;align-items:center;margin:8px 0 18px}
.gccqp-header h2{font-size:1.6rem;margin:0}
.gccqp-current-balance{margin:0}

/* ---------- grid ---------- */
.gccqp-packages{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
@media (max-width:980px){
  .gccqp-packages{grid-template-columns:1fr}
}

/* ---------- cards ---------- */
.gccqp-package{
  position:relative;
  background:var(--gcccs-bg);
  border:1px solid var(--gcccs-border);
  border-radius:var(--gcccs-radius);
  padding:18px;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
  display:flex;
  flex-direction:column;
  min-height:450px;
}
.gccqp-badge{
  position:absolute;top:10px;right:10px;
  background:#111;color:#fff;font-weight:700;font-size:12px;
  padding:4px 8px;border-radius:999px;
}

/* ---------- header + price ---------- */
.gccqp-package-header h3{margin:0 0 8px;font-size:1.25rem}
.gccqp-price{font-size:1.35rem;font-weight:700;margin:2px 0 6px}
.gccqp-credits{font-weight:600;color:var(--gcccs-ink);margin-bottom:10px}

/* ---------- features ---------- */
.gccqp-package-features{
  flex: 1;
  min-height: 200px;
  margin-bottom:12px;
}
.gccqp-package-features h4{margin:0 0 8px;font-size:0.95rem}
.gccqp-package-features ul{margin:0 0 0 18px;padding:0;color:var(--gcccs-muted)}
.gccqp-package-features li{margin:6px 0;line-height:1.4}

/* ---------- actions ---------- */
.gccqp-package-actions{
  margin-top:auto;
  padding-top:12px;
}
.gccqp-btn-buy{
  display:inline-flex;align-items:center;gap:6px;
  background:var(--gcccs-accent);color:#fff !important;border:0;
  padding:10px 14px;border-radius:12px;text-decoration:none;
  min-width:140px;justify-content:center;line-height:1.2;
}
.gccqp-btn-buy:hover{opacity:.95}
.gccqp-buy-note{margin:8px 0 0;font-size:.92rem;color:var(--gcccs-muted)}

/* =================================================================
 * WARNING SECTION - Tách biệt khỏi packages grid
 * ================================================================*/
.gccqp-credits-warning {
  width: 100%;
  margin: 0 0 40px 0; /* Tăng margin bottom */
  padding: 24px;
  background: #fef3c7;
  border: 2px solid #f59e0b;
  border-radius: var(--gcccs-radius);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* Thêm border dưới để tách biệt rõ ràng */
.gccqp-credits-warning::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background: #e5e7eb;
  position: absolute;
  bottom: -20px;
  left: 0;
}

.gccqp-credits-warning {
  position: relative; /* Để ::after hoạt động */
}

.gccqp-credits-warning .warning-icon {
  font-size: 48px;
  line-height: 1;
  flex-shrink: 0;
}

.gccqp-credits-warning .warning-content {
  flex: 1;
}

.gccqp-credits-warning h3 {
  margin: 0 0 12px 0;
  font-size: 1.5rem;
  color: #92400e;
}

.gccqp-credits-warning p {
  margin: 0 0 16px 0;
  color: #78350f;
  font-size: 1rem;
  line-height: 1.6;
}

/* Progress display */
.gccqp-progress-display {
  background: white;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.gccqp-progress-display .progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 600;
  color: #92400e;
}

.progress-bar-container {
  margin-top: 8px;
}

.progress-bar {
  width: 100%;
  height: 32px;
  background: #f3f4f6;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s ease;
}

.progress-label {
  color: white;
  font-weight: 700;
  font-size: 14px;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 13px;
  color: #6b7280;
}

/* Warning actions */
.warning-actions {
  background: white;
  padding: 16px;
  border-radius: 8px;
}

.warning-actions h4 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  color: #92400e;
}

.warning-actions ul {
  margin: 0 0 16px 20px;
  padding: 0;
  color: #78350f;
}

.warning-actions li {
  margin: 8px 0;
  line-height: 1.5;
}

.gccqp-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #3b82f6;
  color: white !important;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}

.gccqp-btn-primary:hover {
  background: #2563eb;
}

/* =================================================================
 * DISABLED PACKAGES SECTION - Thông báo đơn giản
 * ================================================================*/
.gccqp-packages-disabled-section {
  margin-top: 50px;
  clear: both;
}

.disabled-overlay {
  text-align: center;
  padding: 0 0 20px 0;
  margin: 0;
  background: none;
  border: none;
}

.disabled-overlay p {
  margin: 0;
  font-weight: 600;
  color: #92400e;
  font-size: 0.95rem;
}

.gccqp-packages-disabled .gccqp-package {
  opacity: 0.6;
  pointer-events: none;
}

/* =================================================================
 * FOOTER - Căn giữa với đường phân cách
 * ================================================================*/
.gccqp-footer {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid var(--gcccs-border);
  text-align: center;
}

.gccqp-footer p {
  margin: 8px 0;
  color: var(--gcccs-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Mobile responsive for warning */
@media (max-width: 768px) {
  .gccqp-credits-warning {
    flex-direction: column;
    padding: 20px;
  }
  
  .gccqp-credits-warning .warning-icon {
    font-size: 36px;
  }
  
  .gccqp-packages-disabled {
    margin-top: 40px;
  }
}

/* ---------- Technical Limits (Collapsed) ---------- */
.gccqp-package-limits-details {
  margin-top: 12px;
  border-top: 1px solid var(--gcccs-border);
  padding-top: 8px;
}

.gccqp-package-limits-details summary.limits-summary {
  cursor: pointer;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gcccs-muted);
  list-style: none;
  transition: all 0.2s;
}

.gccqp-package-limits-details summary.limits-summary:hover {
  background: #f3f4f6;
  color: var(--gcccs-ink);
}

.gccqp-package-limits-details summary::-webkit-details-marker {
  display: none;
}

.gccqp-package-limits-details summary.limits-summary::after {
  content: "▼";
  float: right;
  font-size: 10px;
  transition: transform 0.2s;
}

.gccqp-package-limits-details[open] summary.limits-summary::after {
  transform: rotate(180deg);
}

.gccqp-package-limits {
  padding: 12px 0 0;
}

.limits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.limit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  background: #f9fafb;
  border-radius: 6px;
  text-align: center;
}

.limit-item .limit-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.limit-item .limit-value {
  font-weight: 700;
  font-size: 16px;
  color: var(--gcccs-ink);
}

.limit-item .limit-label {
  font-size: 11px;
  color: var(--gcccs-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.limit-item.limit-disabled {
  opacity: 0.4;
}

@media (max-width: 640px) {
  .limits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================================
 * Balance pill
 * =======================================================*/
.gccqp-balance-display{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 12px;
  border:1px solid #e5e7eb; border-radius:999px;
  background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.04);
  font-weight:700; color:#111827;
  line-height:1;
}
.gccqp-balance-display .gccqp-balance-icon{ font-size:16px; line-height:1; }
.gccqp-balance-display .gccqp-balance-text{ opacity:.8; font-weight:600; }
.gccqp-balance-display .gccqp-balance-amount{ font-variant-numeric: tabular-nums; }

.gccqp-current-balance strong{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 12px;
  border:1px solid #e5e7eb; border-radius:999px;
  background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.04);
  font-weight:700; color:#111827;
}
.gccqp-current-balance strong::before{
  content:"💳";
  display:inline-block; transform: translateY(-1px);
}

/* =========================================================
 * Header integration (Flatsome)
 * =======================================================*/
.header .header-main .nav-left,
.header .header-nav.header-nav-main.nav.nav-left{
  margin-left:0 !important;
  padding-left:0 !important;
}

.header .header-nav.header-nav-main.nav.nav-left > li.header-block{
  margin-left:0 !important;
  padding-left:0 !important;
}
.header .header-nav.header-nav-main.nav.nav-left > li.header-block .header-block-block-1{
  margin-left:0 !important;
  padding-left:0 !important;
}

.header .header-nav.header-nav-main.nav.nav-left .gccqp-balance-display{
  margin-left:0 !important;
  vertical-align:middle;
  white-space:nowrap;
}

@media (max-width: 550px){
  .header .header-nav.header-nav-main.nav.nav-left .gccqp-balance-display{
    padding:5px 10px;
    font-size:13px;
  }
  .header .header-nav.header-nav-main.nav.nav-left .gccqp-balance-display .gccqp-balance-text{
    display:none;
  }
}

.header .header-nav.header-nav-main.nav.nav-left.nav-uppercase{
  letter-spacing:0;
}

.gccqp-balance-display.tooltipstered{ display:inline-flex !important; }
.header .gccqp-balance-display a{ color:inherit; text-decoration:none; }

/* =================================================================
 * CHECKOUT.CSS — styles cho trang checkout & cart
 * Tách từ class-checkout.php::checkout_custom_css()
 * ================================================================*/

/* ── Credits Warning ──────────────────────────────────────────── */
.gcc-credits-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}
.gcc-credits-warning h3 {
    margin: 0 0 15px 0;
    color: #856404;
}
.gcc-warning-content {
    color: #856404;
}
.gcc-credits-progress {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}
.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
}
.progress-bar-wrapper {
    margin-top: 10px;
}
.progress-bar {
    width: 100%;
    height: 24px;
    background: #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #5B6EF5, #764ba2);
    transition: width 0.3s ease;
}
.progress-text {
    text-align: center;
    font-size: 12px;
    margin-top: 5px;
    color: #666;
}
.gcc-warning-actions {
    margin-top: 15px;
}
.gcc-warning-actions ul {
    margin: 10px 0;
    padding-left: 20px;
}
.gcc-warning-actions li {
    margin: 8px 0;
}

/* ── Cart item badges ─────────────────────────────────────────── */
.gcc-cart-package-info {
    padding: 10px 0;
}
.gcc-cart-package-info strong {
    font-size: 16px;
    color: #2d3748;
}
.gcc-cart-details {
    margin-top: 8px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.gcc-credits-badge {
    background: #5B6EF5;
    color: #fff;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
}
.gcc-package-badge {
    background: linear-gradient(135deg, #5B6EF5, #764ba2);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}
.gcc-action-badge {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}
.gcc-action-upgrade    { background: #10b981; }
.gcc-action-downgrade  { background: #f59e0b; }
.gcc-action-repurchase { background: #6366f1; }

/* ── Checkout sidebar: package info row ───────────────────────── */
.gcc-checkout-package-info td {
    border-top: 2px solid #5B6EF5 !important;
    padding: 20px 0 !important;
}
.gcc-checkout-details {
    background: #fff;
    border-radius: 8px;
}

/* Package title */
.gcc-checkout-pkg-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.gcc-checkout-pkg-badge {
    background: linear-gradient(135deg, #5B6EF5, #764ba2);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

/* Credits hero */
.gcc-checkout-credits-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    color: #fff;
    text-align: center;
}
.gcc-checkout-credits-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}
.gcc-checkout-credits-number {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1;
}
.gcc-checkout-credits-number span {
    font-size: 22px;
}
.gcc-checkout-credits-note {
    font-size: 14px;
    opacity: 0.9;
}

/* Limits blocks — shared */
.gcc-checkout-limits-block {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 14px;
}
.gcc-checkout-limits-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}
.gcc-checkout-limits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
    font-size: 13px;
}
.gcc-checkout-limit-item {
    color: #4a5568;
}
.gcc-checkout-limit-item small {
    opacity: 0.7;
}
.gcc-limit-improved { color: #10b981; font-weight: 600; }
.gcc-limit-reduced  { color: #ef4444; }

/* Greeting limits block */
.gcc-checkout-limits-greeting {
    background: #f7fafc;
}
.gcc-checkout-limits-greeting .gcc-checkout-limits-title {
    color: #4a5568;
}

/* Wedding limits block */
.gcc-checkout-limits-wedding {
    background: #fdf2f8;
}
.gcc-checkout-limits-wedding .gcc-checkout-limits-title {
    color: #b45e8f;
}
.gcc-checkout-limits-wedding .gcc-checkout-limit-item {
    color: #6b3a5e;
}

/* Section labels */
.gcc-checkout-section-label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.03em;
}
.gcc-label-greeting { color: #5B6EF5; }
.gcc-label-wedding  { color: #b45e8f; }

/* Features lists */
.gcc-checkout-features {
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 14px;
}
.gcc-checkout-features ul {
    margin: 6px 0 0 0;
    padding-left: 0;
    list-style: none;
    columns: 2;
    column-gap: 15px;
}
.gcc-checkout-features li {
    margin: 5px 0;
    break-inside: avoid;
}
.gcc-checkout-features-wedding li {
    color: #6b3a5e;
}

/* Divider between card types */
.gcc-checkout-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 14px 0;
}

/* Important notes */
.gcc-checkout-notes {
    padding: 12px;
    background: #fffbcc;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    margin-top: 15px;
}
.gcc-checkout-notes ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}
.gcc-checkout-notes li {
    margin: 4px 0;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .progress-info {
        flex-direction: column;
        gap: 5px;
    }
    .gcc-cart-details {
        flex-direction: column;
        align-items: flex-start;
    }
    .gcc-checkout-limits-grid {
        grid-template-columns: 1fr;
    }
    .gcc-checkout-features ul {
        columns: 1;
    }
    .gcc-checkout-credits-number {
        font-size: 32px;
    }
}