/**
 * Wave Copilot License Manager - Frontend Styles
 *
 * @package WaveCopilotLicense
 */

/* License List */
.wave-licenses-page {
    max-width: 1200px;
    margin: 0 auto;
}

.wave-licenses-page h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1f2937;
}

.wave-licenses-page > p {
    color: #6b7280;
    margin-bottom: 30px;
}

/* License Cards */
.wave-licenses-list {
    display: grid;
    gap: 24px;
    margin-bottom: 40px;
}

.wave-license-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.wave-license-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.wave-license-card.expired {
    opacity: 0.6;
    border-color: #fbbf24;
    background: #fffbeb;
}

/* License Header */
.wave-license-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f3f4f6;
}

.wave-license-key-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.wave-license-key-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wave-license-key {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #10b981;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: "Courier New", Courier, monospace;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    border: none;
    display: inline-block;
}

.wave-copy-btn {
    background: #667eea;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.wave-copy-btn:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.wave-copy-btn.copied {
    background: #10b981;
}

.wave-copy-btn .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

/* Badges */
.wave-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wave-badge-active {
    background: #d1fae5;
    color: #065f46;
}

.wave-badge-expired {
    background: #fee2e2;
    color: #991b1b;
}

.wave-badge-app {
    background: #dbeafe;
    color: #1e40af;
}

.wave-license-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* License Meta */
.wave-license-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.wave-license-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wave-license-meta-item .label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wave-license-meta-item .value {
    font-size: 15px;
    color: #1f2937;
    font-weight: 500;
}

.wave-license-meta-item .value a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.wave-license-meta-item .value a:hover {
    text-decoration: underline;
}

/* Activations Section */
.wave-license-activations {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.wave-license-activations h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wave-activations-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wave-activations-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.wave-activations-list li:last-child {
    border-bottom: none;
}

.wave-activations-list .machine-name {
    font-weight: 600;
    color: #1f2937;
    flex: 1;
}

.wave-activations-list .machine-platform {
    font-size: 13px;
    color: #6b7280;
    padding: 4px 10px;
    background: #e5e7eb;
    border-radius: 4px;
    margin: 0 10px;
}

.wave-activations-list .activation-date {
    font-size: 12px;
    color: #9ca3af;
}

/* Download Section */
.wave-download-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-top: 30px;
}

.wave-download-section h3 {
    margin-top: 0;
    font-size: 24px;
    font-weight: 600;
}

.wave-download-section p {
    font-size: 16px;
    opacity: 0.9;
}

.wave-download-section .button {
    background: white;
    color: #667eea;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.wave-download-section .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.wave-download-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

/* Order Details Page */
.woocommerce-wave-licenses {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-top: 30px;
}

.woocommerce-wave-licenses h2 {
    margin-top: 0;
    font-size: 22px;
    color: #1f2937;
}

.woocommerce-table--wave-licenses {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.woocommerce-table--wave-licenses th,
.woocommerce-table--wave-licenses td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.woocommerce-table--wave-licenses th {
    background: #f3f4f6;
    font-weight: 600;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
}

.woocommerce-table--wave-licenses .wave-license-key {
    font-size: 14px;
    padding: 8px 12px;
}

.wave-license-instructions {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 12px 16px;
    margin-top: 16px;
    border-radius: 4px;
    font-size: 14px;
    color: #1e40af;
}

/* Responsive */
@media (max-width: 768px) {
    .wave-license-header {
        flex-direction: column;
        gap: 16px;
    }

    .wave-license-key {
        font-size: 13px;
        padding: 10px 12px;
        word-break: break-all;
    }

    .wave-license-meta {
        grid-template-columns: 1fr;
    }

    .wave-activations-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .wave-activations-list .machine-platform {
        margin: 0;
    }
}

/* Empty State */
.woocommerce-message--info {
    background: #eff6ff;
    border: 2px solid #93c5fd;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

.woocommerce-message--info p {
    margin-bottom: 16px;
    color: #1e40af;
}
