/* ASM Store - Frontend Styles */

:root {
    --asm-primary: #4F46E5;
    --asm-primary-hover: #4338CA;
    --asm-success: #10B981;
    --asm-error: #EF4444;
    --asm-warning: #F59E0B;
    --asm-border: #E5E7EB;
    --asm-gray-50: #F9FAFB;
    --asm-gray-100: #F3F4F6;
    --asm-gray-600: #4B5563;
    --asm-gray-900: #111827;
}

/* Purchase Form */
.asm-purchase-form {
    max-width: 500px;
    margin: 40px auto;
}

.asm-purchase-card {
    background: white;
    border: 1px solid var(--asm-border);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.asm-purchase-card h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: var(--asm-gray-900);
}

.asm-price {
    font-size: 42px;
    font-weight: bold;
    color: var(--asm-primary);
    margin-bottom: 30px;
}

.asm-form-group {
    margin-bottom: 20px;
}

.asm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--asm-gray-900);
    font-size: 14px;
}

.asm-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--asm-border);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.asm-form-group input:focus {
    outline: none;
    border-color: var(--asm-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.asm-purchase-btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--asm-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 10px;
}

.asm-purchase-btn:hover {
    background: var(--asm-primary-hover);
    transform: translateY(-2px);
}

.asm-purchase-btn:active {
    transform: translateY(0);
}

.asm-purchase-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.asm-features {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--asm-border);
}

.asm-feature {
    padding: 8px 0;
    color: var(--asm-gray-600);
    font-size: 14px;
}

/* Customer Dashboard */
.asm-customer-dashboard {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.asm-dashboard-login {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border: 1px solid var(--asm-border);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.asm-dashboard-login h2 {
    margin-top: 0;
    color: var(--asm-gray-900);
}

.asm-divider {
    text-align: center;
    position: relative;
    margin: 30px 0;
    color: var(--asm-gray-600);
}

.asm-divider::before,
.asm-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: var(--asm-border);
}

.asm-divider::before {
    left: 0;
}

.asm-divider::after {
    right: 0;
}

.asm-dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.asm-dashboard-header h2 {
    font-size: 32px;
    color: var(--asm-gray-900);
    margin-bottom: 10px;
}

.asm-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.asm-dashboard-card {
    background: white;
    border: 1px solid var(--asm-border);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.asm-dashboard-card h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--asm-gray-900);
    font-size: 20px;
    border-bottom: 2px solid var(--asm-gray-100);
    padding-bottom: 12px;
}

.asm-info-group {
    margin-bottom: 20px;
}

.asm-info-group label {
    display: block;
    font-weight: 600;
    color: var(--asm-gray-600);
    font-size: 13px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.asm-info-group > div,
.asm-info-group > span {
    font-size: 15px;
    color: var(--asm-gray-900);
}

.asm-license-key {
    display: flex;
    align-items: center;
    gap: 10px;
}

.asm-license-key code {
    flex: 1;
    background: var(--asm-gray-50);
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid var(--asm-border);
    letter-spacing: 1px;
}

.asm-copy-btn {
    padding: 10px 16px;
    background: var(--asm-gray-100);
    border: 1px solid var(--asm-border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    white-space: nowrap;
}

.asm-copy-btn:hover {
    background: var(--asm-gray-200);
}

.asm-installation-steps {
    margin-top: 25px;
    padding: 20px;
    background: var(--asm-gray-50);
    border-radius: 8px;
    border: 1px solid var(--asm-border);
}

.asm-installation-steps h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--asm-gray-900);
}

.asm-installation-steps ol {
    margin: 0;
    padding-left: 20px;
}

.asm-installation-steps li {
    margin-bottom: 8px;
    color: var(--asm-gray-600);
}

/* Buttons */
.asm-button {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.asm-button-primary {
    background: var(--asm-primary);
    color: white;
}

.asm-button-primary:hover {
    background: var(--asm-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.asm-button-secondary {
    background: transparent;
    color: var(--asm-gray-600);
    border: 1px solid var(--asm-border);
}

.asm-button-secondary:hover {
    background: var(--asm-gray-50);
    border-color: var(--asm-gray-600);
    color: var(--asm-gray-900);
}

.asm-download-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
    margin-bottom: 20px;
}

/* Status Badges */
.asm-status {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.asm-status-active {
    background: #D1FAE5;
    color: #065F46;
}

.asm-status-pending {
    background: #FEF3C7;
    color: #92400E;
}

.asm-status-revoked {
    background: #FEE2E2;
    color: #991B1B;
}

/* Tables */
.asm-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.asm-table thead {
    background: var(--asm-gray-50);
}

.asm-table th,
.asm-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--asm-border);
}

.asm-table th {
    font-weight: 600;
    color: var(--asm-gray-900);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.asm-table td {
    color: var(--asm-gray-600);
    font-size: 14px;
}

/* Alerts */
.asm-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.asm-alert h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.asm-alert p {
    margin: 5px 0;
}

.asm-alert-success {
    background: #D1FAE5;
    border: 1px solid #6EE7B7;
    color: #065F46;
}

.asm-alert-error {
    background: #FEE2E2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

.asm-alert-warning {
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    color: #92400E;
}

/* Messages */
.asm-message {
    margin: 20px 0;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 15px;
}

.asm-message.success {
    background: #D1FAE5;
    border: 1px solid #6EE7B7;
    color: #065F46;
}

.asm-message.error {
    background: #FEE2E2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

/* License Validator */
.asm-license-validator {
    max-width: 600px;
    margin: 40px auto;
}

.asm-validator-card {
    background: white;
    border: 1px solid var(--asm-border);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.asm-validator-card h3 {
    margin-top: 0;
    color: var(--asm-gray-900);
}

/* Responsive */
@media (max-width: 768px) {
    .asm-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .asm-purchase-card,
    .asm-dashboard-login,
    .asm-validator-card {
        padding: 25px;
    }
    
    .asm-price {
        font-size: 36px;
    }
    
    .asm-license-key {
        flex-direction: column;
    }
    
    .asm-copy-btn {
        width: 100%;
    }
}

/* Loading Spinner */
.btn-loader {
    display: inline-block;
}

.btn-loader::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Site Activations Management */
.asm-site-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.asm-site-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.asm-site-info {
    flex: 1;
}

.asm-site-url {
    margin-bottom: 8px;
}

.asm-site-url strong {
    color: #111827;
    font-size: 16px;
}

.asm-site-url-text {
    margin-top: 5px;
}

.asm-site-url-text a {
    color: #4F46E5;
    text-decoration: none;
    font-size: 14px;
}

.asm-site-url-text a:hover {
    text-decoration: underline;
}

.asm-site-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #6b7280;
}

.asm-button-danger {
    background: #EF4444;
    color: white;
}

.asm-button-danger:hover:not(:disabled) {
    background: #DC2626;
}

.asm-button-small {
    padding: 8px 16px;
    font-size: 14px;
}

.asm-loading {
    text-align: center;
    padding: 20px;
    color: #6b7280;
}

.asm-info-box {
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 15px;
}

.asm-info-box strong {
    display: block;
    margin-bottom: 8px;
    color: #1e40af;
}

.asm-info-box p {
    margin: 5px 0;
    color: #1e40af;
}

.asm-info-box ul {
    color: #1e40af;
}

/* Responsive */
@media (max-width: 768px) {
    .asm-site-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .asm-button-small {
        width: 100%;
    }
}
