/* ═══════════════════════════════════════════════════════════════════════════
   Cupom Template / Sugestoes - Estilos
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Alertas ──────────────────────────────────────────────────────────────── */
.cupom-alert {
    position: static !important;
    float: none !important;
    z-index: auto !important;
    width: 100% !important;
    display: block;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
    border: 1px solid transparent;
    box-sizing: border-box;
}
.cupom-alert--danger {
    background-color: #f2dede;
    border-color: #ebccd1;
    color: #a94442;
}
.cupom-alert strong {
    display: block;
    margin-bottom: 2px;
    color: inherit;
}
.cupom-alert .fa {
    color: inherit;
}

/* ─── Section Header ───────────────────────────────────────────────────────── */
.cupom-section-header {
    margin-bottom: 16px;
    padding: 0;
}
.cupom-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cupom-section-subtitle {
    font-size: 13px;
    color: #888;
    margin: 0;
}

/* ─── Smart Badge ──────────────────────────────────────────────────────────── */
.cupom-smart-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(29, 154, 90, 0.12);
    color: #1d9a5a;
    border-radius: 20px;
    padding: 2px 10px;
    margin-left: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

/* ─── Sub-section titles ───────────────────────────────────────────────────── */
.cupom-sub-title {
    font-size: 15px;
    font-weight: 700;
    color: #444;
    margin-bottom: 2px;
    margin-top: 18px;
}
.cupom-sub-desc {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

/* ─── Card ─────────────────────────────────────────────────────────────────── */
.cupom-card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.09);
    width: 100%;
    margin-bottom: 16px;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
    position: relative;
}
.cupom-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
}
.cupom-card--disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(40%);
}
.cupom-card--disabled:hover {
    box-shadow: none;
    transform: none;
}

/* Card Header */
.cupom-card__header {
    padding: 18px 16px 12px;
    background: #fff;
}
.cupom-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}
.cupom-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    padding: 3px 8px;
    margin-bottom: 0;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cupom-card__badge--destaque {
    background: linear-gradient(135deg, rgba(201, 151, 30, 0.15), rgba(212, 160, 23, 0.10));
    color: #C9971E;
}
.cupom-card__badge--destaque .fa {
    color: #C9971E;
    font-size: 11px;
}
.cupom-card__badge--inteligente {
    background: rgba(29, 154, 90, 0.12);
    color: #1d9a5a;
}
.cupom-card__badge--inteligente .fa {
    color: #1d9a5a;
    font-size: 11px;
}

/* Card Valor */
.cupom-card__valor {
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1px;
    color: #1a1a1a;
}
.cupom-card__valor-label {
    font-size: 10px;
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 4px;
}

/* Card Body */
.cupom-card__body {
    padding: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.cupom-card__tagline {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    line-height: 1.4;
    margin-bottom: 8px;
}
.cupom-card__details {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}
.cupom-card__detail {
    flex: 1;
    min-width: 36px;
    background: #f5f5f7;
    border-radius: 6px;
    padding: 6px 8px;
    text-align: center;
}
.cupom-card__detail-label {
    display: block;
    font-size: 9px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
    margin-bottom: 1px;
}
.cupom-card__detail-value {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #1a1a1a;
}

/* Card CTA Button */
.cupom-card__cta {
    width: 100%;
    border-radius: 8px;
    height: 36px;
    font-size: 12px;
    font-weight: 700;
    text-transform: none;
    background: transparent;
    border: 1.5px solid #1a1a1a;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    transition: background 0.15s;
}
.cupom-card__cta:hover {
    background: rgba(0, 0, 0, 0.04);
}
.cupom-card__cta:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ─── Loading ──────────────────────────────────────────────────────────────── */
.cupom-loading {
    padding: 40px;
    text-align: center;
    color: #888;
}
.cupom-loading p {
    margin-top: 12px;
    font-size: 13px;
}

/* ─── Template Confirm Dialog ──────────────────────────────────────────────── */
.ngdialog-cupom-confirm .ngdialog-content {
    border-radius: 17px;
    overflow: hidden;
    padding: 0 !important;
    max-width: 420px;
    margin: auto;
}

.tc-header {
    background: #fff;
    padding: 24px 24px 16px;
    text-align: center;
}
.tc-title {
    font-size: 14px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.tc-valor {
    font-size: 42px;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1;
    letter-spacing: -1px;
}
.tc-valor-label {
    font-size: 11px;
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 4px;
}

/* Confirm Rows */
.tc-rows {
    padding: 0 24px 8px;
}
.tc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.tc-row:last-child {
    border-bottom: none;
}
.tc-row-label {
    font-size: 13px;
    color: #888;
}
.tc-row-value {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
}

/* Free Delivery Tier Selection */
.tc-regra-entrega {
    padding: 16px 24px;
    background: #fafafa;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.tc-regra-title {
    font-size: 13px;
    font-weight: 700;
    color: #444;
    margin-bottom: 2px;
}
.tc-regra-hint {
    font-size: 12px;
    color: #888;
    margin-bottom: 12px;
}
.tc-regra-opcoes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tc-regra-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1.5px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}
.tc-regra-btn:hover {
    border-color: #1d9a5a;
}
.tc-regra-btn--active {
    border-color: #1d9a5a;
    background: rgba(29, 154, 90, 0.06);
}
.tc-regra-label {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
}
.tc-regra-desc {
    font-size: 11px;
    color: #888;
    margin-top: 1px;
}

/* Alert */
.tc-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 24px;
    background: #fffbeb;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 12px;
    color: #92400e;
    line-height: 1.4;
}
.tc-alert .fa {
    color: #b45309;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Actions */
.tc-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}
.tc-btn-voltar {
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    padding: 8px 16px;
}
.tc-btn-voltar:hover {
    color: #555;
}
.tc-btn-ativar {
    background: #1d9a5a;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}
.tc-btn-ativar:hover {
    background: #178a4e;
}
.tc-btn-ativar:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Templates Panel ──────────────────────────────────────────────────────── */
.cupom-templates-panel {
    padding: 20px;
    margin-top: 20px;
    margin-bottom: 0;
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Coupon Table - Labels, Chips, Progress
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Type & Destaque Labels ───────────────────────────────────────────────── */
.ct-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
}
.ct-label .fa {
    font-size: 12px;
}
.ct-label--entrega {
    color: #E67E22;
}
.ct-label--itens {
    color: #3060CA;
}
.ct-label--destaque {
    color: #C9971E;
}
.ct-label--primeiro {
    color: #3060CA;
}
.ct-label--lista {
    color: #999;
    font-weight: 400;
}

/* ─── Value Sub-info ───────────────────────────────────────────────────────── */
.ct-sub-info {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
    font-weight: 400;
}

/* ─── Usage Column ─────────────────────────────────────────────────────────── */
.ct-uso-total {
    color: #999;
    font-weight: 400;
}
.ct-uso-disp {
    font-size: 11px;
    color: #999;
    margin-left: 2px;
}
.ct-uso-tipo {
    font-size: 11px;
    color: #999;
    margin-top: 3px;
}
.ct-progress-wrap {
    width: 80px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}
.ct-progress-bar {
    height: 100%;
    background: #337ab7;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ─── Status Chips ─────────────────────────────────────────────────────────── */
.ct-chip {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #fff;
}
.ct-chip--primary {
    background: #337ab7;
}
.ct-chip--danger {
    background: #d9534f;
}
.ct-chip--gray {
    background: #999;
}
