/**
 * Weavelinx License Server - Public/Frontend Styles
 *
 * @package Weavelinx_License_Server
 * @since 1.0.0
 */

/* ==========================================================================
   My Account - License Section
   ========================================================================== */

.wl-myaccount-licenses {
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   License Cards
   ========================================================================== */

.wl-license-card {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 20px;
    background: #fff;
}

.wl-license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
    background: #fafafa;
}

.wl-license-product {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.wl-license-body {
    padding: 20px;
}

/* ==========================================================================
   License Status Badges (Frontend)
   ========================================================================== */

.wl-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.wl-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
}

.wl-status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.wl-status-active::before {
    background: #4caf50;
}

.wl-status-expired {
    background: #fff8e1;
    color: #f57c00;
}

.wl-status-expired::before {
    background: #ff9800;
}

.wl-status-inactive {
    background: #ffebee;
    color: #c62828;
}

.wl-status-inactive::before {
    background: #f44336;
}

.wl-status-suspended {
    background: #eceff1;
    color: #546e7a;
}

.wl-status-suspended::before {
    background: #78909c;
}

/* ==========================================================================
   License Key Display
   ========================================================================== */

.wl-license-key-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 12px 15px;
    background: #f5f5f5;
    border-radius: 4px;
}

.wl-license-key-row label {
    font-weight: 600;
    min-width: 100px;
}

.wl-license-key-value {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    flex: 1;
    word-break: break-all;
}

.wl-copy-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.wl-copy-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.wl-copy-btn.copied {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

/* ==========================================================================
   License Details Grid
   ========================================================================== */

.wl-license-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.wl-detail-item {
    padding: 10px;
    background: #fafafa;
    border-radius: 4px;
}

.wl-detail-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.wl-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* ==========================================================================
   Activation Progress
   ========================================================================== */

.wl-activation-usage {
    margin-bottom: 20px;
}

.wl-usage-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.wl-usage-label {
    font-size: 13px;
    color: #666;
}

.wl-usage-count {
    font-size: 13px;
    font-weight: 600;
}

.wl-usage-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.wl-usage-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.wl-usage-fill.low {
    background: linear-gradient(90deg, #4caf50, #8bc34a);
}

.wl-usage-fill.medium {
    background: linear-gradient(90deg, #ff9800, #ffc107);
}

.wl-usage-fill.high {
    background: linear-gradient(90deg, #f44336, #ff5722);
}

/* ==========================================================================
   Activations List
   ========================================================================== */

.wl-activations-section {
    border-top: 1px solid #e5e5e5;
    padding-top: 15px;
}

.wl-activations-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.wl-activations-title::after {
    content: '▼';
    font-size: 10px;
    transition: transform 0.2s;
}

.wl-activations-title.collapsed::after {
    transform: rotate(-90deg);
}

.wl-activations-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wl-activation-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #fafafa;
}

.wl-activation-domain {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    color: #333;
    word-break: break-all;
}

.wl-activation-date {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
}

.wl-deactivate-btn {
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #666;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}

.wl-deactivate-btn:hover {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

/* ==========================================================================
   License Actions
   ========================================================================== */

.wl-license-actions {
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.wl-license-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f5f5f5;
    color: #333;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.wl-license-btn:hover {
    background: #e0e0e0;
}

.wl-license-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wl-license-btn-primary {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.wl-license-btn-primary:hover {
    background: #005a87;
    color: #fff;
}

/* Renewal notice */
.wl-renewal-notice {
    font-size: 12px;
    color: #d63638;
    background: #fcf0f1;
    padding: 4px 10px;
    border-radius: 3px;
    border: 1px solid #d63638;
}

/* Renew button styling for expired/expiring */
.wl-renew-license-btn {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
}

.wl-renew-license-btn:hover {
    background: #b32d2e;
    color: #fff;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.wl-no-licenses {
    text-align: center;
    padding: 40px 20px;
    background: #fafafa;
    border-radius: 4px;
}

.wl-no-licenses-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 15px;
}

.wl-no-licenses-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

/* ==========================================================================
   Download Section
   ========================================================================== */

.wl-download-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
}

.wl-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #2e7d32;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.wl-download-btn:hover {
    background: #1b5e20;
    color: #fff;
}

.wl-download-btn svg {
    width: 16px;
    height: 16px;
}

.wl-version-info {
    font-size: 12px;
    color: #666;
    margin-left: 10px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media screen and (max-width: 600px) {
    .wl-license-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .wl-license-key-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .wl-license-key-row label {
        min-width: auto;
    }

    .wl-license-details {
        grid-template-columns: 1fr;
    }

    .wl-activation-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
