/**
 * Customer Portal Styles
 *
 * @package WP_Plugin_Server
 */

.wps-license-portal {
    max-width: 800px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wps-portal-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wps-portal-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #1f2937;
}

.wps-portal-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #1f2937;
}

.wps-portal-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #374151;
}

/* Forms */
.wps-form-group {
    margin-bottom: 20px;
}

.wps-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.wps-form-group input[type="text"],
.wps-form-group input[type="email"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.wps-form-group input[type="text"]:focus,
.wps-form-group input[type="email"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Buttons */
.wps-button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.wps-button-primary {
    background: #3b82f6;
    color: white;
}

.wps-button-primary:hover {
    background: #2563eb;
}

.wps-button-secondary {
    background: #6b7280;
    color: white;
}

.wps-button-secondary:hover {
    background: #4b5563;
}

.wps-button-small {
    padding: 6px 12px;
    font-size: 13px;
}

.wps-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Messages */
.wps-portal-error,
.wps-portal-success {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.wps-portal-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.wps-portal-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Details Table */
.wps-details-table {
    width: 100%;
    border-collapse: collapse;
}

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

.wps-details-table th {
    font-weight: 600;
    color: #6b7280;
    width: 180px;
}

.wps-details-table td {
    color: #1f2937;
}

.wps-details-table code {
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
}

/* Status Badges */
.wps-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.wps-status-active {
    background: #d1fae5;
    color: #065f46;
}

.wps-status-expired {
    background: #fef3c7;
    color: #92400e;
}

.wps-status-revoked {
    background: #fee2e2;
    color: #991b1b;
}

.wps-expired-notice {
    color: #dc2626;
    font-weight: 500;
}

/* Domain List */
.wps-domain-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.wps-domain-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 8px;
}

.wps-domain-name {
    font-family: monospace;
    font-size: 14px;
    color: #1f2937;
}

.wps-deactivate-btn {
    background: #ef4444;
    color: white;
}

.wps-deactivate-btn:hover {
    background: #dc2626;
}

/* Activate Domain Section */
.wps-activate-domain {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.wps-activate-domain .wps-form-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.wps-activate-domain input[type="text"] {
    flex: 1;
}

.wps-help-text {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.wps-no-domains {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* Notices */
.wps-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 20px;
}

.wps-notice-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

/* Loading States */
.wps-button.loading {
    opacity: 0.7;
    pointer-events: none;
}

.wps-button.loading::after {
    content: "...";
    animation: loading 1s infinite;
}

@keyframes loading {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* Responsive */
@media (max-width: 640px) {
    .wps-license-portal {
        margin: 20px;
    }

    .wps-portal-section {
        padding: 20px;
    }

    .wps-details-table th {
        width: 120px;
    }

    .wps-activate-domain .wps-form-group {
        flex-direction: column;
    }

    .wps-activate-domain input[type="text"] {
        width: 100%;
    }

    .wps-domain-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
