/* Estilos para la página de perfil */

/* Apply top spacing for larger screens */
@media (min-width: 768px) {
    main.container {
        margin-top: 3rem !important;
        padding-top: 3rem !important;
    }
}

/* Ensure the profile sidebar is clickable */
#member-view .col-md-3 {
    position: -webkit-sticky; /* For Safari */
    position: sticky;
    top: 100px; /* Offset for the navbar */
    align-self: flex-start; /* Important for sticky positioning in a flex container */
    z-index: 2;
}

/* Make the stories content scrollable on desktop */
@media (min-width: 768px) {
    #profile-tabs-content {
        max-height: calc(100vh - 150px); /* Adjust height considering navbar and padding */
        overflow-y: auto;
        padding-right: 15px; /* Add some space for the scrollbar */
    }

    /* Custom Scrollbar for stories feed */
    #profile-tabs-content::-webkit-scrollbar {
        width: 8px;
    }
    #profile-tabs-content::-webkit-scrollbar-track {
        background: #212529;
    }
    #profile-tabs-content::-webkit-scrollbar-thumb {
        background-color: #495057;
        border-radius: 4px;
        border: 2px solid #212529;
    }
    #profile-tabs-content::-webkit-scrollbar-thumb:hover {
        background-color: #6c757d;
    }
}

#member-view .nav-tabs .nav-link {
    color: #fff; /* Texto blanco para las pestañas */
}

#member-view .nav-tabs .nav-link.active {
    background-color: #343a40; /* Fondo oscuro para la pestaña activa */
    border-color: #343a40;
}

.tab-content {
    background-color: #212529; /* Fondo oscuro para el contenido de las pestañas */
    padding: 20px;
    border-radius: 0 0 8px 8px;
}

#user-avatar {
    width: 250px;
    height: 250px;
    object-fit: cover; /* Ensure the image covers the area without distortion */
    border: 3px solid #fff;
}

#user-details {
    margin-top: 15px;
    padding: 10px;
    background-color: #212529;
    border-radius: 8px;
    text-align: left;
}

#user-details p {
    margin-bottom: 5px;
    color: #e0e0e0;
}

#user-details strong {
    color: #ffffff;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
    #member-view .col-md-3 {
        position: static; /* Override sticky position on mobile */
        /* max-height: 60vh; */ /* Removed to allow content to expand */
        /* overflow-y: auto; */ /* Removed to prevent separate scrollbar */
        margin-bottom: 20px; /* Add some space below it */
        padding: 15px; /* Add some padding for aesthetics */
        border: 1px solid #343a40; /* Add a border to define the scrollable area */
        border-radius: 8px; /* Rounded corners */
    }

    /* Custom scrollbar for the user info panel on mobile - REMOVED */
    /*
    #member-view .col-md-3::-webkit-scrollbar {
        width: 6px;
    }
    #member-view .col-md-3::-webkit-scrollbar-track {
        background: #212529;
    }
    #member-view .col-md-3::-webkit-scrollbar-thumb {
        background-color: #495057;
        border-radius: 3px;
    }
    */

    .tab-content {
        padding: 15px;
    }

    #member-view .nav-tabs .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 576px) {
    #user-info .col-md-8 {
        text-align: center;
    }

    #user-avatar {
        width: 100px;
        height: 100px;
        margin-bottom: 1rem;
    }

    .tab-content {
        padding: 10px;
    }

    #member-view .nav-tabs {
        flex-direction: column;
    }

    #member-view .nav-tabs .nav-item {
        width: 100%;
        text-align: center;
    }

    #member-view .nav-tabs .nav-link {
        border-radius: 5px;
        margin-bottom: 5px;
    }

    #member-view .nav-tabs .nav-link.active {
        border-radius: 5px;
    }
}

/* Estilos para las secciones de Historias, Comentarios y Likes */
.list-group-item.bg-dark.text-white {
    background-color: #343a40 !important; /* Un tono más claro que el fondo principal */
    border-color: #495057; /* Borde sutil */
    margin-bottom: 8px; /* Espacio entre elementos */
    border-radius: 5px; /* Bordes redondeados */
    transition: all 0.3s ease; /* Transición suave para hover */
}

.list-group-item.bg-dark.text-white:hover {
    background-color: #495057 !important; /* Cambio de color al pasar el ratón */
    transform: translateY(-2px); /* Ligero efecto de elevación */
}

.list-group-item h5.mb-1 {
    color: #ffffff; /* Color de título */
    font-weight: bold;
}

.list-group-item small {
    color: #cccccc; /* Color para fechas/detalles */
}

.list-group-item p.mb-1 {
    color: #e0e0e0; /* Color para el contenido del comentario */
}

.list-group-item em {
    color: #adb5bd; /* Color para el título de la historia en comentarios */
    font-style: normal;
}

.list-group-item strong {
    color: #ffffff; /* Color para texto resaltado en likes */
}

.avatar-upload-container {
    position: relative;
    display: inline-block;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

/* Estilos para las notificaciones en el perfil */
#notifications-list .notification-item.bg-primary-subtle {
    background-color: #495057 !important; /* Medium gray for unread notifications */
}

/* Style for the logo in guest view */
.guest-logo {
    max-width: 400px; /* Adjust as needed */
    height: auto;
    display: block; /* Center the image */
    margin: 20px auto; /* Center the image and add vertical margin */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Custom styles for Login and Register buttons in guest view */
#guest-view .btn-primary {
    background-color: #D4AF37; /* Gold background */
    color: #000000; /* Black text */
    border-color: #000000; /* Black border */
    font-weight: bold;
    transition: all 0.3s ease;
}

#guest-view .btn-primary:hover {
    background-color: #212529; /* Dark background on hover */
    color: #FFFFFF; /* White text on hover */
    border-color: #D4AF37; /* Gold border on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#guest-view .btn-secondary {
    background-color: #212529; /* Dark background */
    color: #D4AF37; /* Gold text */
    border-color: #D4AF37; /* Gold border */
    font-weight: bold;
    transition: all 0.3s ease;
}

#guest-view .btn-secondary:hover {
    background-color: #D4AF37; /* Gold background on hover */
    color: #000000; /* Black text on hover */
    border-color: #000000; /* Black border on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Apply the same style to login/register buttons inside modals */
.modal .btn-primary {
    background-color: #D4AF37; /* Gold background */
    color: #000000; /* Black text */
    border-color: #000000; /* Black border */
    font-weight: bold;
    transition: all 0.3s ease;
}

.modal .btn-primary:hover {
    background-color: #212529; /* Dark background on hover */
    color: #FFFFFF; /* White text on hover */
    border-color: #D4AF37; /* Gold border on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Style for the "Editar Perfil" button */
#edit-profile-btn {
    background-color: #D4AF37; /* Gold background */
    color: #000000; /* Black text */
    border-color: #000000; /* Black border */
    font-weight: bold;
    transition: all 0.3s ease;
    /* MDBootstrap .btn-sm reduces padding, so we might need to adjust */
    padding: 0.5rem 1rem; /* Adjust padding to look similar to larger buttons but still small */
    font-size: 0.875rem; /* Standard for btn-sm */
}

#edit-profile-btn:hover {
    background-color: #212529; /* Dark background on hover */
    color: #FFFFFF; /* White text on hover */
    border-color: #D4AF37; /* Gold border on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Style for the "Cerrar Sesión" button */
#logout-btn {
    background-color: #DC3545; /* Red background (Bootstrap danger) */
    color: #FFFFFF; /* White text */
    border-color: #FFFFFF; /* White border */
    font-weight: bold;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem; /* Adjust padding to look similar to larger buttons but still small */
    font-size: 0.875rem; /* Standard for btn-sm */
    margin-top: 10px; /* Add some margin as it's below edit profile */
}

#logout-btn:hover {
    background-color: #212529; /* Dark background on hover */
    color: #DC3545; /* Red text on hover */
    border-color: #DC3545; /* Red border on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
