/**
 * Account Page Styles
 */

/* Account Container */
.account-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.account-header h1 {
    margin: 0;
}

/* Login Section */
.login-card {
    max-width: 500px;
    margin: 0 auto;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-card > p {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.login-error {
    background: #fee;
    border-left: 4px solid #f44;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.login-error strong {
    color: #c00;
}

.login-links {
    margin-top: 1.5rem;
    text-align: center;
}

.login-links hr {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid #e5e5e5;
}

.login-links .btn {
    width: 100%;
    display: block;
    text-align: center;
    margin-block-start: 1em;
}

/* Login Form Styles */
#squeeze-login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

#squeeze-login-form input[type="text"],
#squeeze-login-form input[type="password"] {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
}

#squeeze-login-form input[type="submit"] {
    width: 100%;
    padding: 0.75rem;
    background: hsl(43, 95%, 55%);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
}

#squeeze-login-form input[type="submit"]:hover {
    background: hsl(35, 95%, 50%);
}

/* Sandbox Warning */
.sandbox-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sandbox-warning-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sandbox-icon {
    font-size: 2rem;
}

.sandbox-title {
    color: #856404;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.sandbox-description {
    margin: 0;
    color: #856404;
}

/* Profile Section */
.profile-section {
    margin-bottom: 1.5rem;
}

.profile-section h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group small {
    color: #666;
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.save-status {
    font-weight: 500;
    font-size: 0.875rem;
}

/* Action button loading state (Save Changes, Cancel Auto-Renew, etc.) */
.btn.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    cursor: wait;
    opacity: 0.9;
}

.btn.is-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1em;
    height: 1em;
    margin: -0.5em 0 0 -0.5em;
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-right-color: transparent;
    border-radius: 50%;
    animation: account-btn-spin 0.6s linear infinite;
}

.btn.btn-outline.is-loading::after {
    border-color: #555;
    border-right-color: transparent;
}

.btn.btn-danger.is-loading::after {
    border-color: rgba(255, 255, 255, 0.95);
    border-right-color: transparent;
}

@keyframes account-btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Subscription Section */
.subscriptions-section {
    margin-bottom: 1.5rem;
}

.subscriptions-section h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.loading-message {
    text-align: center;
    color: #666;
    padding: 1.5rem;
}

.subscription-item {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.subscription-item.is-sandbox {
    border-color: #ffc107;
    background: #fffbf0;
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.subscription-title {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.subscription-details {
    margin-bottom: 1rem;
}

.subscription-details p {
    margin: 0.5rem 0;
}

.subscription-actions {
    display: flex;
    gap: 0.625rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-sandbox {
    background: #ffc107;
    color: #856404;
}

.badge-cancelled {
    background: #dc3545;
    color: white;
}

.badge-active {
    background: #28a745;
    color: white;
}

/* Welcome Section (No Freemius Account) */
.welcome-card {
    text-align: center;
}

/* Password Reset Section */
.password-reset-section h2 {
    margin-top: 0;
    margin-bottom: 0.625rem;
}

.password-reset-section > p {
    color: #666;
    margin-bottom: 2rem;
}

.reset-status {
    margin-top: 1rem;
}

.reset-status p {
    margin: 0;
    font-weight: 500;
}

.status-sending {
    color: #666;
}

.status-success {
    color: #28a745;
}

.status-error {
    color: #dc3545;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .account-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .subscription-actions {
        flex-direction: column;
    }
    
    .subscription-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
