/* ================================================================
   SCM License Manager — My Account Styles
   Modern card-based license dashboard for customers
================================================================ */

/* ── Wrapper ──────────────────────────────────────────────────── */
.lm-account-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.lm-account-header {
    margin-bottom: 24px;
}
.lm-account-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #2d3436;
}
.lm-account-header p {
    color: #636e72;
    margin: 0;
    font-size: 14px;
}

/* ── License grid ─────────────────────────────────────────────── */
.lm-license-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
@media (max-width: 480px) {
    .lm-license-grid { grid-template-columns: 1fr; }
}

/* ── License card ─────────────────────────────────────────────── */
.lm-license-card {
    background: #fff;
    border: 1.5px solid #e8e8f0;
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 4px 20px rgba(108,92,231,.06);
    transition: box-shadow .2s, transform .2s;
    position: relative;
    overflow: hidden;
}
.lm-license-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
}
.lm-lm-badge--expired-card::before  { background: linear-gradient(90deg, #d63031, #fd79a8); }
.lm-lm-badge--inactive-card::before { background: #dee2e6; }
.lm-license-card:hover { box-shadow: 0 8px 32px rgba(108,92,231,.14); transform: translateY(-2px); }

/* Card top */
.lm-card-top { display: flex; flex-direction: column; gap: 8px; }
.lm-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.lm-product-name { font-size: 15px; font-weight: 700; color: #2d3436; }

.lm-card-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.lm-meta-pill {
    background: #f0eeff;
    color: #6c5ce7;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ── Badges ───────────────────────────────────────────────────── */
.lm-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.lm-badge--active   { background: #d1fae5; color: #065f46; }
.lm-badge--expired  { background: #fee2e2; color: #7f1d1d; }
.lm-badge--inactive { background: #f3f4f6; color: #4b5563; }

/* ── Key section ──────────────────────────────────────────────── */
.lm-key-section { display: flex; flex-direction: column; gap: 6px; }
.lm-key-section label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #636e72; }
.lm-key-field {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9ff;
    border: 1.5px solid #e0e0f0;
    border-radius: 8px;
    padding: 8px 12px;
}
.lm-key-text {
    flex: 1;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    letter-spacing: 2px;
    color: #6c5ce7;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: none;
    border: none;
    padding: 0;
}
.lm-copy-btn {
    background: none;
    border: 1.5px solid #c7c0f5;
    border-radius: 6px;
    padding: 5px 8px;
    cursor: pointer;
    color: #6c5ce7;
    display: flex;
    align-items: center;
    transition: all .15s;
    flex-shrink: 0;
}
.lm-copy-btn:hover { background: #6c5ce7; color: #fff; border-color: #6c5ce7; }
.lm-copy-btn.copied { background: #00b894; border-color: #00b894; color: #fff; }

/* ── Info grid ────────────────────────────────────────────────── */
.lm-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.lm-info-item { display: flex; flex-direction: column; gap: 4px; }
.lm-info-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #636e72; }
.lm-info-value { font-size: 13px; color: #2d3436; font-weight: 500; }
.lm-info-value a { color: #6c5ce7; text-decoration: none; }
.lm-info-value a:hover { text-decoration: underline; }
.lm-info-value small { color: #636e72; font-size: 11px; display: block; }

.lm-lifetime     { color: #00b894; font-weight: 700; }
.lm-expired-text { color: #d63031; font-weight: 700; }
.lm-expiring-soon{ color: #e17055; font-weight: 700; }

/* Usage bar */
.lm-usage-bar {
    height: 5px;
    background: #e8e8f0;
    border-radius: 99px;
    margin-top: 5px;
    overflow: hidden;
}
.lm-usage-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
    border-radius: 99px;
    transition: width .3s;
}

/* ── Card actions ─────────────────────────────────────────────── */
.lm-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid #f0f0f8;
    margin-top: auto;
}

.lm-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all .15s;
    line-height: 1.3;
}
.lm-btn--primary {
    background: #6c5ce7;
    color: #fff;
}
.lm-btn--primary:hover { background: #5a4bc8; color: #fff; }

.lm-btn--download {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    box-shadow: 0 4px 14px rgba(108,92,231,.3);
}
.lm-btn--download:hover {
    box-shadow: 0 6px 20px rgba(108,92,231,.4);
    transform: translateY(-1px);
    color: #fff;
}
.lm-btn--download.loading { opacity: .7; cursor: not-allowed; pointer-events: none; }

.lm-btn--renew {
    background: #fff;
    color: #6c5ce7;
    border: 2px solid #6c5ce7;
    text-decoration: none;
}
.lm-btn--renew:hover { background: #6c5ce7; color: #fff; }

/* ── Empty state ──────────────────────────────────────────────── */
.lm-empty-state {
    text-align: center;
    padding: 60px 24px;
    background: #fff;
    border: 2px dashed #e8e8f0;
    border-radius: 14px;
}
.lm-empty-icon { font-size: 56px; margin-bottom: 16px; }
.lm-empty-state h3 { font-size: 20px; margin: 0 0 8px; color: #2d3436; }
.lm-empty-state p  { color: #636e72; margin: 0 0 24px; font-size: 14px; }

/* ── Thank you box (WooCommerce) ──────────────────────────────── */
.lm-thankyou-box {
    background: linear-gradient(135deg, #f0eeff, #f8f9ff);
    border: 2px solid #c7c0f5;
    border-radius: 14px;
    padding: 24px;
    margin: 24px 0;
}
.lm-thankyou-box h3 { margin: 0 0 16px; color: #2d3436; }
.lm-thankyou-key {
    background: #fff;
    border: 1.5px solid #e0e0f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lm-thankyou-key code {
    font-size: 16px;
    letter-spacing: 2px;
    color: #6c5ce7;
    font-weight: 700;
}
.lm-thankyou-key small { color: #636e72; font-size: 12px; }
