/**
 * WC License Manager - Frontend Styles
 */

.wc-license-manager-account {
    margin: 20px 0;
}

.wc-licenses-list {
    margin-top: 20px;
}

.wc-license-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    padding: 20px;
}

.wc-license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.wc-license-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.wc-license-product {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.wc-license-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.wc-license-status-active {
    background: #c6e1c6;
    color: #2e7d32;
}

.wc-license-status-inactive {
    background: #ffcdd2;
    color: #c62828;
}

.wc-license-status-suspended {
    background: #fff9c4;
    color: #f57f17;
}

.wc-license-status-expired {
    background: #e0e0e0;
    color: #424242;
}

.wc-license-toggle {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.wc-license-toggle:hover {
    background: #e0e0e0;
}

.wc-license-toggle-icon {
    transition: transform 0.3s ease;
}

.wc-license-toggle[aria-expanded="true"] .wc-license-toggle-icon {
    transform: rotate(180deg);
}

.wc-license-details {
    padding-top: 15px;
}

.wc-license-key-section {
    margin-bottom: 20px;
}

.wc-license-key-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

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

.wc-license-key {
    flex: 1;
    background: #f9f9f9;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    word-break: break-all;
}

.wc-copy-license-key {
    white-space: nowrap;
}

.wc-copy-license-key.copied {
    background: #4caf50;
    color: #fff;
    border-color: #4caf50;
}

.wc-license-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.wc-license-meta-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
}

.wc-license-domains {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.wc-license-domains h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
}

.wc-license-domains h5 {
    margin: 15px 0 10px 0;
    font-size: 14px;
    font-weight: 600;
}

.wc-license-domains-list {
    margin-bottom: 20px;
}

.wc-license-loading {
    padding: 20px;
    text-align: center;
    color: #999;
}

.wc-domain-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.wc-domain-info {
    flex: 1;
}

.wc-domain-url {
    font-weight: 600;
    color: #333;
}

.wc-domain-meta {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.wc-domain-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
}

.wc-domain-status-active {
    background: #c6e1c6;
    color: #2e7d32;
}

.wc-domain-status-inactive {
    background: #e0e0e0;
    color: #666;
}

.wc-domain-actions {
    display: flex;
    gap: 8px;
}

.wc-domain-deactivate {
    background: #f44336;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.wc-domain-deactivate:hover {
    background: #d32f2f;
}

.wc-license-activate-form {
    margin-top: 20px;
    padding: 15px;
    background: #f0f7ff;
    border: 1px solid #90caf9;
    border-radius: 4px;
}

.wc-license-activate-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.wc-license-domain-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wc-license-activate-btn {
    white-space: nowrap;
}

.wc-license-inactive-notice,
.wc-license-limit-notice {
    padding: 12px;
    background: #fff9c4;
    border-left: 4px solid #fbc02d;
    margin-top: 15px;
}

.wc-license-no-domains {
    padding: 15px;
    text-align: center;
    color: #999;
    background: #f9f9f9;
    border-radius: 4px;
}

/* Messages */
.wc-license-message {
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.wc-license-message.success {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.wc-license-message.error {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-license-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .wc-license-toggle {
        width: 100%;
        justify-content: center;
    }

    .wc-license-key-wrapper {
        flex-direction: column;
    }

    .wc-copy-license-key {
        width: 100%;
    }

    .wc-license-activate-wrapper {
        flex-direction: column;
    }

    .wc-license-activate-btn {
        width: 100%;
    }

    .wc-domain-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .wc-domain-actions {
        width: 100%;
    }

    .wc-domain-deactivate {
        width: 100%;
    }
}
