/* Profile Popup Styles */
.profile-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

.profile-popup-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    animation: slideInUp 0.4s ease-out forwards;
}

.profile-popup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.profile-popup-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.profile-popup-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-popup-info {
    flex: 1;
    text-align: left;
}

.profile-popup-name {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 4px;
}

.profile-popup-email {
    font-size: 14px;
    opacity: 0.9;
}

.profile-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.profile-popup-body {
    padding: 30px;
    display: grid;
    grid-template-columns: 35% 62%;
    gap: 30px;
    align-items: start;
}

.profile-balance-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.profile-info-sections {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.profile-balance-card {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    transition: all 0.3s ease;
    min-height: 60px;
}

.profile-balance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.profile-balance-card.refund {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.profile-balance-card.pending {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
}

.profile-balance-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    flex: 1;
}

.profile-balance-label i {
    margin-right: 8px;
    font-size: 16px;
}

.profile-balance-amount {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.2;
    flex-shrink: 0;
}

.profile-info-section {
    margin-bottom: 30px;
}

.profile-section-title {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f8f9fa;
}

.profile-section-title i {
    margin-right: 10px;
    color: #667eea;
    font-size: 20px;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.profile-info-item {
    display: flex;
    flex-direction: column;
}

.profile-info-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
}

.profile-info-value {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-size: 14px;
    min-height: 20px;
    word-break: break-word;
}

.profile-info-value a {
    color: #667eea;
    text-decoration: none;
}

.profile-info-value a:hover {
    text-decoration: underline;
}

.profile-edit-input {
    display: none;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
    box-sizing: border-box;
}

.profile-edit-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

.profile-edit-input[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.7;
}

.profile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

.profile-edit-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

.profile-action-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
}

.profile-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

.profile-action-btn.secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.profile-action-btn.secondary:hover {
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .profile-popup-container {
        width: 95%;
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .profile-popup-header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .profile-popup-info {
        text-align: center;
    }
    
    .profile-popup-body {
        padding: 20px;
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .profile-balance-cards {
        margin-bottom: 0;
    }
    
    .profile-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .profile-actions {
        grid-template-columns: 1fr;
    }
    
    .profile-edit-actions {
        grid-template-columns: 1fr;
    }
    
    .profile-popup-name {
        font-size: 20px;
    }
    
    .profile-popup-email {
        font-size: 14px;
    }
    
    .profile-balance-card {
        padding: 12px 15px;
        min-height: 50px;
    }
    
    .profile-balance-label {
        font-size: 12px;
    }
    
    .profile-balance-label i {
        font-size: 14px;
        margin-right: 6px;
    }
    
    .profile-balance-amount {
        font-size: 16px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Loading state */
.profile-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #666;
}

.profile-loading .spinner-border {
    width: 2rem;
    height: 2rem;
    margin-right: 10px;
}

/* Success/Error states */
.profile-success {
    border-left: 4px solid #28a745;
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.profile-error {
    border-left: 4px solid #dc3545;
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}
