/* static/subscriptions/css/subscription-banner.css */

/* Design tokens (defaults). Override these in your global tokens file or :root */
:root {
  --zt-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --zt-base-size: 14px;
  --zt-line-height: 1.4;
  --zt-font-weight-regular: 400;
  --zt-font-weight-medium: 600;
  --zt-font-weight-bold: 700;

  --zt-padding-vertical: 12px;
  --zt-padding-horizontal: 16px;
  --zt-gap: 12px;
  --zt-radius: 8px;

  --zt-title-size: 15px;
  --zt-subtitle-size: 13px;
  --zt-quota-size: 16px;
  --zt-action-size: 14px;

  --zt-text-healthy: #064e3b;    /* green-ish for healthy */
  --zt-text-warning: #92400e;    /* amber/orange */
  --zt-text-danger: #7f1d1d;     /* red */
  --zt-bg-healthy: #ecfdf5;
  --zt-bg-warning: #fffbeb;
  --zt-bg-danger: #fff1f2;
  --zt-border-healthy: #bbf7d0;
  --zt-border-warning: #fde68a;
  --zt-border-danger: #fecaca;

  --zt-action-bg: #4f46e5;
  --zt-action-text: #ffffff;
  --zt-action-border: rgba(79,70,229,0.12);
  --zt-action-hover: #4338ca;
  --zt-action-text-hover: #ffffff;
}

/* Base banner layout */
.zt-banner{
  font-family: var(--zt-font-family);
  font-size: var(--zt-base-size);
  line-height: var(--zt-line-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--zt-padding-vertical) var(--zt-padding-horizontal);
  border-radius: var(--zt-radius);
  box-sizing: border-box;
  gap: var(--zt-gap);
  border: 1px solid transparent;
}

/* Left column */
.zt-banner__left{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.zt-banner__icon{
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  flex: 0 0 36px;
}

.zt-icon-fill{
  fill: currentColor;
}

/* Text */
.zt-banner__text{
  min-width: 0;
}

.zt-banner__title{
  font-size: var(--zt-title-size);
  font-weight: var(--zt-font-weight-medium);
  color: var(--zt-text-healthy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zt-banner__subtitle{
  margin-top: 2px;
  font-size: var(--zt-subtitle-size);
  color: rgba(15,23,36,0.7);
  font-weight: var(--zt-font-weight-regular);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right side */
.zt-banner__right{
  display:flex;
  align-items:center;
  gap: 12px;
  flex-shrink: 0;
}

.zt-banner__quota{
  font-size: var(--zt-quota-size);
  font-weight: var(--zt-font-weight-bold);
  color: var(--zt-text-healthy);
  min-width: 56px;
  text-align: right;
}

/* Action button */
.zt-banner__action{
  display:inline-block;
  font-size: var(--zt-action-size);
  background: var(--zt-action-bg);
  color: var(--zt-action-text);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--zt-action-border);
  text-decoration: none;
  font-weight: var(--zt-font-weight-medium);
  cursor: pointer;
}

.zt-banner__action:focus{
  outline: 3px solid rgba(79,70,229,0.18);
  outline-offset: 2px;
}

.zt-banner__action:hover{
  background: var(--zt-action-hover);
  color: var(--zt-action-text-hover);
}

/* Themes: healthy / warning / error */
.zt-banner--healthy{
  background: var(--zt-bg-healthy);
  border-color: var(--zt-border-healthy);
  color: var(--zt-text-healthy);
}

.zt-banner--healthy .zt-banner__title,
.zt-banner--healthy .zt-banner__quota {
  color: var(--zt-text-healthy);
}

.zt-banner--warning{
  background: var(--zt-bg-warning);
  border-color: var(--zt-border-warning);
  color: var(--zt-text-warning);
}

.zt-banner--warning .zt-banner__title,
.zt-banner--warning .zt-banner__quota {
  color: var(--zt-text-warning);
}

.zt-banner--error{
  background: var(--zt-bg-danger);
  border-color: var(--zt-border-danger);
  color: var(--zt-text-danger);
}

.zt-banner--error .zt-banner__title,
.zt-banner--error .zt-banner__quota {
  color: var(--zt-text-danger);
}

/* Small responsive tweaks */
@media (max-width: 640px){
  .zt-banner{
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .zt-banner__right{
    justify-content: space-between;
    width: 100%;
  }
  .zt-banner__title{
    font-size: 15px;
  }
}
