/**
 * WorldWin Coder Plugin Licence Manager — Frontend (My Account) Styles
 *
 * @package WWC_License_Manager
 */

/* ── Grid ─────────────────────────────────────────────────────── */
.wwc-lm-license-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* ── Card ─────────────────────────────────────────────────────── */
.wwc-lm-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}

.wwc-lm-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.wwc-lm-card--active {
    border-color: #a8d5b2;
}

.wwc-lm-card--inactive {
    border-color: #f1b8b8;
}

/* ── Card header ──────────────────────────────────────────────── */
.wwc-lm-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f9f9f9;
    border-bottom: 1px solid #e8e8e8;
}

.wwc-lm-card--active .wwc-lm-card__header {
    background: #f0faf3;
    border-bottom-color: #c3e6cb;
}

.wwc-lm-card--inactive .wwc-lm-card__header {
    background: #fff8f8;
    border-bottom-color: #f5c6cb;
}

.wwc-lm-card__plugin-name {
    font-weight: 700;
    font-size: 15px;
    color: #2c3e50;
}

/* ── Card body ────────────────────────────────────────────────── */
.wwc-lm-card__body {
    padding: 14px 18px;
}

.wwc-lm-card__row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #f2f2f2;
    font-size: 14px;
}

.wwc-lm-card__row:last-child {
    border-bottom: none;
}

.wwc-lm-card__label {
    color: #666;
    min-width: 110px;
    flex-shrink: 0;
    font-size: 13px;
    padding-top: 2px;
}

.wwc-lm-card__value {
    color: #333;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Key code ─────────────────────────────────────────────────── */
.wwc-lm-key {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    letter-spacing: 2px;
    background: #f0f6fc;
    border: 1px solid #c0d6e8;
    border-radius: 4px;
    padding: 3px 8px;
    color: #1a5c99;
}

/* ── Copy button ──────────────────────────────────────────────── */
.wwc-lm-copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    color: #666;
    line-height: 1;
}

.wwc-lm-copy-btn:hover {
    color: #1a5c99;
}

.wwc-lm-copy-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ── Status badges ────────────────────────────────────────────── */
.wwc-lm-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.wwc-lm-badge--active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wwc-lm-badge--inactive {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ── Expired indicator ────────────────────────────────────────── */
.wwc-lm-expired {
    color: #c0392b;
    font-weight: 600;
}

/* ── Download section ─────────────────────────────────────────── */
.wwc-lm-card__downloads {
    border-top: 2px solid #e8f0f8;
    background: #f4f9ff;
    padding: 14px 18px;
}

.wwc-lm-card--active .wwc-lm-card__downloads {
    border-top-color: #c3e6cb;
    background: #f0faf3;
}

.wwc-lm-card--inactive .wwc-lm-card__downloads {
    border-top-color: #f5c6cb;
    background: #fff8f8;
}

.wwc-lm-card__downloads-title {
    font-size: 13px;
    font-weight: 700;
    color: #444;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wwc-lm-card__downloads-title .dashicons {
    color: #1a7ec8;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ── Download list ────────────────────────────────────────────── */
.wwc-lm-download-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wwc-lm-download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border: 1px solid #dce8f5;
    border-radius: 5px;
    padding: 8px 12px;
}

.wwc-lm-card--inactive .wwc-lm-download-item {
    border-color: #e8d5d5;
}

.wwc-lm-download-name {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Download button ──────────────────────────────────────────── */
.wwc-lm-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #1a7ec8;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .18s, transform .12s;
    flex-shrink: 0;
}

.wwc-lm-download-btn:hover,
.wwc-lm-download-btn:focus {
    background: #155fa0;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.wwc-lm-download-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

/* Plugin name as clickable link */
.wwc-lm-card__product-link {
    color: inherit;
    text-decoration: none;
}
.wwc-lm-card__product-link:hover {
    text-decoration: underline;
    color: #1a7ec8;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 480px) {
    .wwc-lm-license-grid {
        grid-template-columns: 1fr;
    }
    .wwc-lm-card__label {
        min-width: 90px;
    }
}
