/**
 * WooCommerce License Keys Display - Styles
 */

.woocommerce-license-keys {
    margin: 20px 0;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    overflow: hidden;
}

.woocommerce-license-keys h3 {
    margin: 0;
    padding: 15px 20px;
    background: #f8f8f8;
    border-bottom: 1px solid #e1e1e1;
    color: #333;
    font-size: 18px;
}

.woocommerce-license-keys table {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-license-keys th,
.woocommerce-license-keys td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f1f1f1;
}

.woocommerce-license-keys th {
    background: #f8f8f8;
    font-weight: 600;
    color: #555;
}

.woocommerce-license-keys code {
    background: #f1f1f1;
    padding: 5px 8px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    word-break: break-all;
    display: inline-block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-license-btn {
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    margin-left: 8px;
    transition: background-color 0.3s ease;
}

.copy-license-btn:hover {
    background: #005a87;
}

.copy-license-btn:active {
    background: #004769;
}

.copy-license-btn.copied {
    background: #46b450;
}

.woocommerce-license-keys .button.view {
    font-size: 12px;
    padding: 6px 12px;
    height: auto;
    line-height: 1.2;
}

/* License Keys Grid Layout */
.license-keys-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin: 20px 0;
}

.license-card {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    background: #f9f9f9;
    transition: box-shadow 0.3s ease;
}

.license-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.license-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
}

.license-key-display {
    background: white;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin: 10px 0;
    position: relative;
}

.license-key-display code {
    max-width: none;
    white-space: normal;
    word-break: break-all;
    background: transparent;
    padding: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .woocommerce-license-keys table,
    .woocommerce-license-keys thead,
    .woocommerce-license-keys tbody,
    .woocommerce-license-keys th,
    .woocommerce-license-keys td,
    .woocommerce-license-keys tr {
        display: block;
    }
    
    .woocommerce-license-keys thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .woocommerce-license-keys tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 10px;
        border-radius: 4px;
    }
    
    .woocommerce-license-keys td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .woocommerce-license-keys td:before {
        content: attr(data-title) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        color: #555;
    }
    
    .license-keys-grid {
        grid-template-columns: 1fr;
    }
    
    .license-card {
        margin-bottom: 15px;
    }
}

/* Loading State */
.license-keys-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.license-keys-loading:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

/* Empty State */
.no-license-keys {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.no-license-keys:before {
    content: "🔑";
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}
