/* ============================================================================
   PROFILE PANEL STYLES
   ============================================================================ */

/* Profile header in panel */
.panel-profile-header {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, rgba(76, 170, 201, 0.1), rgba(76, 170, 201, 0.05));
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.panel-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4caac9, #3d98b3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.panel-profile-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.panel-profile-email {
    font-size: 0.9rem;
    color: #718096;
}

/* Panel sections */
.panel-section {
    margin-bottom: 2rem;
}

.panel-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Info grid for profile fields */
.panel-info-grid {
    display: grid;
    gap: 1rem;
}

.panel-info-item {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.panel-info-item.editable {
    cursor: pointer;
}

.panel-info-item.editable:hover {
    background: #f1f5f9;
    border-color: rgba(76, 170, 201, 0.3);
}

.panel-info-item.editing {
    background: white;
    border-color: #4caac9;
    box-shadow: 0 0 0 3px rgba(76, 170, 201, 0.1);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.info-value {
    color: #2d3748;
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.edit-icon {
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.edit-icon:hover {
    color: #4caac9;
    background: rgba(76, 170, 201, 0.1);
}

.edit-form {
    display: none;
}

.edit-form.active {
    display: block;
}

/* Form elements in panels */
.panel-form-group {
    margin-bottom: 1.25rem;
}

.panel-form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #f9fafb;
}

.panel-form-input:focus {
    outline: none;
    border-color: #4caac9;
    background: white;
    box-shadow: 0 0 0 3px rgba(76, 170, 201, 0.1);
}

.field-help {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Buttons in panels */
.panel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.panel-btn-primary {
    background: linear-gradient(135deg, #4caac9, #3d98b3);
    color: white;
}

.panel-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 170, 201, 0.3);
}

.panel-btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.panel-btn-secondary:hover {
    background: #d1d5db;
}

.panel-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.panel-btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.panel-btn-full {
    width: 100%;
}

.panel-edit-link {
    background: none;
    border: none;
    color: #4caac9;
    text-decoration: none;
    font-size: 0.875rem;
    margin-left: auto;
    cursor: pointer;
    transition: color 0.2s;
    white-space: nowrap;
}

.panel-edit-link:hover {
    color: #3d98b3;
    text-decoration: underline;
}

/* Action section */
.panel-action-section {
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

/* Blue theme button for Change Password */
.panel-action-section .panel-btn-full {
    background: linear-gradient(135deg, #4caac9, #3d98b3);
    color: white;
    border: none;
}

.panel-action-section .panel-btn-full:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 170, 201, 0.3);
    background: linear-gradient(135deg, #3d98b3, #4caac9);
}

.panel-action-section .panel-btn-full i {
    color: white;
}

/* Danger zone */
.panel-danger-section {
    background: rgba(239, 68, 68, 0.05);
    border: 2px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
}

.panel-danger-content {
    text-align: center;
}

.panel-danger-content p {
    color: #991b1b;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Security notes and info panels */
.panel-security-note {
    background: #fffbeb;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.panel-security-note i {
    color: #f59e0b;
    margin-top: 0.125rem;
}

.panel-security-note strong {
    color: #92400e;
}

.panel-password-requirements {
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.panel-password-requirements h4 {
    color: #1e40af;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.panel-password-requirements li {
    color: #3b82f6;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-info-panel {
    background: #f8f9fa;
    border-left: 4px solid #ced4da;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.panel-info-panel h4 {
    margin: 0 0 0.5rem 0;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 600;
}

.panel-info-panel p {
    margin: 0;
    color: #6c757d;
    font-size: 0.875rem;
}

.panel-info-panel.security {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
}

.panel-info-panel.security p {
    color: #856404;
    font-weight: 500;
}

/* Modal for account deletion */
.panel-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.panel-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.panel-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.panel-modal-title {
    color: #ef4444;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.panel-modal-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
}

.panel-modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.warning-list, 
.blocking-list {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.blocking-list {
    background: #fef2f2;
    border-color: #ef4444;
}

.warning-list h4, 
.blocking-list h4 {
    margin-bottom: 0.5rem;
    color: #92400e;
}

.blocking-list h4 {
    color: #991b1b;
}

.warning-item, 
.blocking-item {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: #78350f;
}

.blocking-item {
    color: #7f1d1d;
}

.confirmation-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.confirmation-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #fca5a5;
    border-radius: 6px;
    margin: 0.5rem 0;
    font-size: 0.875rem;
}

.confirmation-input:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.loading-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* ============================================================================
   SUBSCRIPTION & BILLING SECTION
   ============================================================================ */

.subscription-info-compact {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.subscription-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    min-height: 60px;
    transition: background 0.2s;
}

.subscription-row:last-child {
    border-bottom: none;
}

.subscription-row.clickable {
    cursor: pointer;
}

.subscription-row.clickable:hover {
    background: #f9fafb;
}

.subscription-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    flex-shrink: 0;
    min-width: 140px;
}

.subscription-value-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: flex-end;
}

.subscription-value {
    font-size: 0.9rem;
    color: #1f2937;
    text-align: right;
}

.subscription-value.credits-value {
    font-weight: 600;
    color: #4caac9;
    font-size: 1rem;  /* Changed from 0.9rem - make credits bigger */
}

.plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;  /* Changed from 0.375rem 0.75rem - smaller */
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;  /* Changed from 0.85rem - smaller */
}

.plan-badge i {
    font-size: 0.7rem;  /* Changed from 0.75rem - smaller */
}

.subscription-action-btn {
    padding: 0.3rem 0.625rem;  /* Changed from 0.375rem 0.75rem - smaller */
    background: linear-gradient(135deg, #4caac9, #3d98b3);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;  /* Changed from 0.8rem - smaller */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.subscription-action-btn i {
    font-size: 0.7rem;  /* Changed from 0.75rem - smaller */
}

.subscription-chevron {
    font-size: 0.85rem;
    color: #9ca3af;
}

/* Payment method icon styling */
.subscription-value .fa-credit-card {
    vertical-align: middle;
}

.coming-soon-text {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #6b7280;
    font-style: italic;
    font-size: 0.85rem;
}

.coming-soon-text i {
    color: #f59e0b;
}

/* ============================================================================
   CONDENSED ACCOUNT INFORMATION SECTION
   ============================================================================ */

.account-info-compact {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.account-info-row {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
}

.account-info-row:last-child {
    border-bottom: none;
}

.account-info-row .info-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.account-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    flex-shrink: 0;
    min-width: 140px;
}

.account-value-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.account-value {
    font-size: 0.9rem;
    color: #1f2937;
    text-align: right;
    word-break: break-word;
    margin-left: auto;  /* Add this to push to the right */
}

.edit-icon-small {
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.edit-icon-small:hover {
    color: #4caac9;
    background: rgba(76, 170, 201, 0.1);
}

.panel-edit-link-compact {
    background: none;
    border: none;
    color: #4caac9;
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s;
    white-space: nowrap;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.panel-edit-link-compact:hover {
    color: #3d98b3;
    background: rgba(76, 170, 201, 0.1);
}

.panel-edit-link-compact i {
    font-size: 0.75rem;
}

/* Compact form elements */
.panel-form-input-compact {
    width: 100%;
    padding: 0.625rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s;
    background: #f9fafb;
}

.panel-form-input-compact:focus {
    outline: none;
    border-color: #4caac9;
    background: white;
    box-shadow: 0 0 0 3px rgba(76, 170, 201, 0.1);
}

.form-actions-compact {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.625rem;
}

.panel-btn-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

/* Edit mode states for compact account info */
.account-info-row .edit-form {
    display: none;
    margin-top: 0.75rem;
}

.account-info-row .edit-form.active {
    display: block;
}

.account-info-row.editing {
    background: #f9fafb;
    border-color: rgba(76, 170, 201, 0.3);
}

.account-info-row.editing .info-display {
    display: none;
}

/* Mobile adjustments */
@media (max-width: 1024px) {
    .form-actions {
        flex-direction: column;
    }

    .panel-btn {
        width: 100%;
    }

    .subscription-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.875rem;
    }
    
    .subscription-label {
        min-width: auto;
    }
    
    .subscription-value-container {
        width: 100%;
        justify-content: space-between;
    }
    
    .subscription-action-btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }
    
    .account-info-row .info-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .account-label {
        min-width: auto;
    }
    
    .account-value-container {
        width: 100%;
        justify-content: space-between;
    }
    
    .form-actions-compact {
        flex-direction: column;
    }
    
    .panel-btn-compact {
        width: 100%;
    }
}

