/* Addresses Page Styles */
.addresses-section {
    background-color: #f9f9f9;
    min-height: 80vh;
    padding: 60px 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: #f5f5f5;
    color: #3b82f6;
}

.mobile-menu-toggle i {
    display: block;
}

/* Mobile Account Header */
.mobile-account-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.mobile-user-info {
    display: flex;
    align-items: center;
}

.mobile-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    border: 2px solid #f0f0f0;
}

.mobile-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-user-details h5 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: #1f2937;
}

.mobile-user-details p {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

/* Account Sidebar */
.account-sidebar {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 30px;
    position: sticky;
    top: 20px;
}

.account-user {
    display: flex;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.account-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    border: 2px solid #f0f0f0;
}

.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.account-info h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.account-info p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.account-menu {
    display: flex;
    flex-direction: column;
}

.account-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    margin-bottom: 5px;
}

.account-menu-item i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.account-menu-item:hover {
    background-color: #f5f5f5;
    color: #3b82f6;
}

.account-menu-item.active {
    background-image: linear-gradient(to right, #3b82f6, #0d9488);
    color: white;
}

.account-menu-item.logout {
    margin-top: 20px;
    color: #ef4444;
}

.account-menu-item.logout:hover {
    background-color: #fef2f2;
}

/* Addresses Content */
.addresses-content {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

.addresses-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.addresses-header p {
    color: #666;
    margin: 0;
}

/* Address Tabs */
.address-tabs .nav-tabs {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 25px;
}

.address-tabs .nav-link {
    color: #6b7280;
    border: none;
    padding: 10px 20px;
    font-weight: 500;
    position: relative;
}

.address-tabs .nav-link:hover {
    color: #3b82f6;
}

.address-tabs .nav-link.active {
    color: #3b82f6;
    background-color: transparent;
    font-weight: 600;
}

.address-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #3b82f6;
}

/* Address Cards */
.address-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    height: 100%;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.address-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.address-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.address-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.address-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.badge {
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
}

.address-card-body {
    margin-bottom: 20px;
}

.address-line {
    margin-bottom: 5px;
    color: #4b5563;
}

.address-phone {
    display: flex;
    align-items: center;
    color: #4b5563;
    margin-top: 10px;
}

.address-card-footer {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.address-actions {
    display: flex;
    gap: 10px;
}

.address-default-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.make-default-btn {
    color: #3b82f6;
    padding: 0;
    font-size: 0.9rem;
}

.make-default-btn:hover {
    text-decoration: underline;
}

/* Empty Addresses */
.empty-addresses {
    padding: 50px 0;
}

.empty-addresses-icon {
    color: #ccc;
}

/* Address Form */
.modal-body {
    padding: 25px;
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
}

.form-control, .form-select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

.form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Alert Styling */
.alert {
    border-radius: 8px;
    padding: 12px 20px;
}

.alert-success {
    background-color: #ecfdf5;
    border-color: #d1fae5;
    color: #065f46;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .account-sidebar {
        margin-bottom: 30px;
        position: static;
    }
    
    .addresses-section {
        padding: 40px 0;
    }
}

@media (max-width: 767px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Show mobile account header */
    .mobile-account-header {
        display: flex;
    }
    
    /* Hide desktop sidebar on mobile */
    .account-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    /* Ensure avatar images are visible in mobile sidebar */
    .account-sidebar .account-avatar img {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        max-width: 100% !important;
        height: auto !important;
    }
    
    .account-sidebar.active {
        left: 0;
    }
    
    /* Mobile overlay */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Close button for mobile sidebar */
    .mobile-sidebar-close {
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #666;
        cursor: pointer;
        padding: 5px;
        border-radius: 50%;
        transition: all 0.3s ease;
    }
    
    .mobile-sidebar-close:hover {
        background-color: #f5f5f5;
        color: #ef4444;
    }

    .addresses-content {
        padding: 20px;
    }
    
    .addresses-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .address-tabs .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .address-card {
        margin-bottom: 20px;
    }
    
    .address-card-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .address-badges {
        margin-top: 10px;
    }
    
    .address-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .address-actions .btn {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .addresses-section {
        padding: 30px 0;
    }
    
    .addresses-header h2 {
        font-size: 1.5rem;
    }
    
    .address-tabs .nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .address-tabs .nav-item {
        flex: 0 0 auto;
    }
}