/**
 * ATU Subscription Portal - Styles
 */

.atu-portal-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.atu-portal-header {
    text-align: center;
    margin-bottom: 40px;
}

.atu-portal-header h2 {
    margin: 0 0 10px;
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
}

.atu-portal-header p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

.atu-portal-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Loading state */
.atu-portal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.atu-portal-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.atu-portal-loading p {
    color: #666;
    font-size: 16px;
}

/* Sections */
.atu-portal-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.atu-portal-section-title {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.atu-section-icon {
    font-size: 20px;
}

/* Grid layout */
.atu-portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.atu-portal-stat {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.atu-stat-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.atu-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.atu-stat-unit {
    font-size: 14px;
    font-weight: 400;
    color: #999;
}

/* Badge styles */
.atu-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.atu-badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.atu-badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.atu-badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Card display */
.atu-portal-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 6px;
}

.atu-card-info {
    flex: 1;
}

.atu-card-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.atu-card-display {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.atu-card-expires {
    font-size: 13px;
    color: #999;
}

/* Buttons */
.atu-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.atu-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.atu-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.atu-btn-primary {
    background-color: #2563eb;
    color: white;
}

.atu-btn-primary:hover:not(:disabled) {
    background-color: #1d4ed8;
}

.atu-btn-secondary {
    background-color: #e5e7eb;
    color: #1a1a1a;
}

.atu-btn-secondary:hover:not(:disabled) {
    background-color: #d1d5db;
}

.atu-btn-danger {
    background-color: #dc2626;
    color: white;
    padding: 12px 20px;
}

.atu-btn-danger:hover:not(:disabled) {
    background-color: #b91c1c;
}

/* Actions */
.atu-portal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 20px 0;
}

/* Modal */
.atu-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.atu-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.atu-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
}

.atu-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.atu-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.atu-modal-close:hover {
    color: #1a1a1a;
}

.atu-modal-body {
    padding: 24px;
}

#sq-creditcard {
    margin-bottom: 20px;
}

.atu-form-note {
    font-size: 13px;
    color: #999;
    margin: 0;
}

.atu-modal-footer {
    display: flex;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid #e0e0e0;
    justify-content: flex-end;
}

/* Notifications */
.atu-portal-notice {
    padding: 16px 20px;
    border-radius: 6px;
    font-size: 14px;
}

.atu-portal-notice-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.atu-portal-notice-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.atu-portal-notice-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.atu-portal-notice a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 640px) {
    .atu-portal-header h2 {
        font-size: 24px;
    }

    .atu-portal-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .atu-portal-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .atu-btn {
        width: 100%;
        text-align: center;
    }

    .atu-modal-content {
        width: 95%;
    }

    .atu-portal-actions {
        flex-direction: column;
    }
}