/**
 * BHD Woo Licenses Manager - Frontend Styles
 * Modern, Dashboard-aligned design
 */

:root {
    --bhd-front-primary: #0f172a;
    --bhd-front-secondary: #64748b;
    --bhd-front-bg: #f8fafc;
    --bhd-front-border: #e2e8f0;
    --bhd-front-blue: #3b82f6;
    --bhd-front-dark-blue: #1d4ed8;
    --bhd-front-danger: #ef4444;
    --bhd-front-success: #22c55e;
    --bhd-front-radius: 8px;
    --bhd-front-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* ... (Previous Styles kept for context) ... */

.bhd-wlm-order-licenses {
    margin: 32px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 800px;
}

/* Heading */
.bhd-wlm-order-licenses h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--bhd-front-primary);
    margin-bottom: 24px;
    border-bottom: 2px solid var(--bhd-front-border);
    padding-bottom: 12px;
    line-height: 1.3;
}

/* License Item Card */
.bhd-wlm-license-item {
    background: #ffffff;
    border: 1px solid var(--bhd-front-border);
    border-radius: var(--bhd-front-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border-left: 4px solid var(--bhd-front-dark-blue);
    position: relative;
    box-sizing: border-box;
}

.bhd-wlm-license-item:hover {
    box-shadow: var(--bhd-front-shadow);
    transform: translateY(-2px);
}

/* Product Title */
.bhd-wlm-license-item h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--bhd-front-primary);
    line-height: 1.4;
}

/* License Key Wrapper */
.bhd-wlm-license-key {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bhd-front-bg);
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid var(--bhd-front-border);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

/* The Code Itself */
.bhd-wlm-license-key code {
    flex-grow: 1;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 15px;
    color: var(--bhd-front-primary);
    background: transparent;
    padding: 0;
    border: none;
    word-break: break-all;
    line-height: 1.5;
}

/* Copy Button */
button.bhd-wlm-copy-btn {
    background-color: var(--bhd-front-dark-blue);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    line-height: 1;
    white-space: nowrap;
    text-transform: none;
}

button.bhd-wlm-copy-btn:hover {
    background-color: #1e40af;
    color: #ffffff;
}

button.bhd-wlm-copy-btn:active {
    transform: translateY(1px);
}

/* Expiry & Meta */
.bhd-wlm-license-meta {
    font-size: 13px;
    margin-top: 8px;
}

.bhd-wlm-license-expiry {
    color: var(--bhd-front-danger);
    background-color: #fef2f2;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    font-weight: 500;
}

/* Download Section */
.bhd-wlm-download-section {
    margin-top: 32px;
    text-align: center;
    border-top: 1px solid var(--bhd-front-border);
    padding-top: 24px;
}

button.bhd-wlm-download-btn {
    background-color: #ffffff;
    color: var(--bhd-front-primary);
    border: 1px solid var(--bhd-front-border);
    border-radius: var(--bhd-front-radius);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

button.bhd-wlm-download-btn:hover {
    background-color: var(--bhd-front-bg);
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* =========================================
   LOOP STOCK BADGE STYLES 
   ========================================= */

.bhd-wlm-stock-badge {
    margin-top: 8px;
    margin-bottom: 8px;
    display: inline-block !important;
    /* Force display */
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    z-index: 10;
    position: relative;
    width: auto;
    max-width: 100%;
}

/* Template: Simple (Text Only) */
.bhd-wlm-stock-badge.is-simple {
    color: var(--bhd-front-success);
    font-weight: 600;
}

/* Template: Modern (Faint Background Badge) */
.bhd-wlm-stock-badge.is-modern {
    background-color: #dcfce7;
    color: #166534;
    padding: 4px 12px;
    border-radius: 9999px;
    /* Pill shape */
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Template: Neon (Black BG + Green Glow) */
.bhd-wlm-stock-badge.is-neon {
    color: #4ade80;
    background-color: #000;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #22c55e;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
    font-family: monospace;
    letter-spacing: 0.5px;
}

/* Template: Outline (Border Only) */
.bhd-wlm-stock-badge.is-outline {
    background-color: transparent;
    border: 1px solid var(--bhd-front-success);
    color: var(--bhd-front-success);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}


/* =========================================
   PAGINATION STYLES
   ========================================= */

.bhd-wlm-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 20px 0 24px;
    padding: 12px 0;
    border-top: 1px solid var(--bhd-front-border);
}

.bhd-wlm-page-btn {
    background-color: #ffffff;
    color: var(--bhd-front-dark-blue);
    border: 1px solid var(--bhd-front-border);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.bhd-wlm-page-btn:hover:not(:disabled) {
    background-color: var(--bhd-front-dark-blue);
    color: #ffffff;
    border-color: var(--bhd-front-dark-blue);
}

.bhd-wlm-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.bhd-wlm-page-info {
    font-size: 13px;
    color: var(--bhd-front-secondary);
    font-weight: 500;
    min-width: 80px;
    text-align: center;
}

.bhd-wlm-current-page {
    font-weight: 700;
    color: var(--bhd-front-dark-blue);
}

/* Responsive adjustments */

@media (max-width: 600px) {
    .bhd-wlm-license-key {
        flex-direction: column;
        align-items: stretch;
    }

    .bhd-wlm-license-key code {
        margin-bottom: 8px;
        text-align: center;
    }

    button.bhd-wlm-copy-btn {
        width: 100%;
        text-align: center;
    }
}