/**
 * DigiSell Pro Public Styles
 */

/* Licenses Container */
.digisell-licenses {
    max-width: 800px;
}

.digisell-licenses h2 {
    margin-bottom: 20px;
}

/* License Card */
.digisell-license-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.digisell-license-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f9f9f9;
}

.digisell-license-product {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.digisell-license-product h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Status Badges */
.digisell-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.digisell-status.status-active {
    background: #d4edda;
    color: #155724;
}

.digisell-status.status-expired {
    background: #fff3cd;
    color: #856404;
}

.digisell-status.status-revoked {
    background: #f8d7da;
    color: #721c24;
}

.digisell-status.status-trial {
    background: #d1ecf1;
    color: #0c5460;
}

.digisell-status.status-suspended {
    background: #e2e3e5;
    color: #383d41;
}

.digisell-status.status-deactivated {
    background: #e2e3e5;
    color: #383d41;
}

/* License Body */
.digisell-license-body {
    padding: 20px;
}

.digisell-license-info {
    margin-bottom: 20px;
}

.digisell-info-row {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.digisell-info-row:last-child {
    border-bottom: none;
}

.digisell-info-row label {
    flex: 0 0 130px;
    font-weight: 500;
    color: #666;
}

.digisell-info-row span,
.digisell-info-row .digisell-key-wrapper {
    flex: 1;
}

/* Key Wrapper */
.digisell-key-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.digisell-license-key,
.digisell-secret-key {
    font-family: monospace;
    font-size: 13px;
    padding: 5px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    word-break: break-all;
}

.digisell-secret-key {
    font-size: 11px;
    max-width: 100%;
}

/* Copy Button */
.digisell-copy-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.digisell-copy-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.digisell-copy-btn.copied {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.digisell-copy-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Expires Soon */
.digisell-expires-soon {
    color: #dc3545;
    font-weight: 500;
}

/* Activations */
.digisell-activations {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.digisell-activations h4 {
    margin: 0 0 15px;
    font-size: 14px;
    font-weight: 600;
}

.digisell-activations-table {
    width: 100%;
    border-collapse: collapse;
}

.digisell-activations-table th,
.digisell-activations-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.digisell-activations-table th {
    background: #f9f9f9;
    font-weight: 500;
    font-size: 13px;
    color: #666;
}

.digisell-activations-table td {
    font-size: 14px;
}

.digisell-activations-table a {
    color: inherit;
    text-decoration: none;
}

.digisell-activations-table a:hover {
    text-decoration: underline;
}

/* Deactivate Button */
.digisell-deactivate-btn {
    font-size: 12px;
}

.digisell-deactivate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* No Licenses */
.digisell-no-licenses {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* Loading Spinner */
.digisell-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: digisell-spin 0.8s linear infinite;
}

@keyframes digisell-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages */
.digisell-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.digisell-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.digisell-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .digisell-info-row {
        flex-direction: column;
        gap: 5px;
    }

    .digisell-info-row label {
        flex: none;
    }

    .digisell-activations-table th:nth-child(2),
    .digisell-activations-table td:nth-child(2) {
        display: none;
    }

    .digisell-license-product {
        flex-direction: column;
        align-items: flex-start;
    }
}
