:root {
    --rojo: #e74c3c;
}

.user-name {
    font-size: 50px;
    font-weight: bold;
}

.profile-header {
    display: flex;
    flex-direction: column;
    background-color: var(--aqua);
    padding: 30px;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 30px;
}

#profile-title {
    color: var(--blanco);

}

#profile-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--blanco);
}

#profile-text p {
    margin: 0;
}


.logout-btn:hover {
    background-color: var(--blanco);
    color: var(--aqua);
}

/*Pushes the log out button to the right end of the banner, with its bottom
lined up with the bottom of the profile picture*/
.profile-op {
    margin-left: auto;
    align-self: flex-end;
}

/*Inline links let their padding spill out of the box, which made the button
stick out below the picture. As a block it ends exactly where the row ends*/
.profile-op .logout-btn {
    display: inline-block;
}


.profile-btn img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.profile-img {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/*Placeholder circle when the user has no picture yet*/
.profile-img-vacia {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 90px;
    color: var(--blanco);
    background-color: var(--celeste);
}

/*White box under the banner*/
.profile-box {
    margin: 30px;
    padding: 25px 30px;
    background-color: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 10px;
    color: var(--texto);
}

.profile-box h2 {
    margin-top: 0;
    font-size: 30px;
    color: var(--aqua);
}

/* default: when there's a picture */
a.profile-btn:has(img),
a.profile-btn:has(img):hover {
    border: none;
    background: transparent;
    color: var(--blanco);
}

/* when there's no picture */
a.profile-btn:has(i) {
    border: 1px solid var(--blanco);
    background: transparent;
}

/* hover effect just for the icon */
a.profile-btn:has(i):hover {
    border: 1px solid var(--blanco);
    background: var(--blanco);
    color: var(--aqua);
}

.profile-form{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-button {
    padding: 8px 14px;
    border: 1px solid var(--aqua);
    border-radius: 6px;
    background-color: transparent;
    color: var(--aqua);
    cursor: pointer;
    font-size: 14px;
    width: fit-content;
}

.file-button:hover {
    background-color: var(--aqua);
    color: var(--blanco);
}

.file-button.okay {
    background-color: var(--aqua);
    color: var(--blanco);
}

#nombre-archivo {
    color: var(--texto-suave);
}

dialog {
    border: 1px solid var(--borde);
    border-radius: 10px;
    padding: 20px;
    background-color: var(--blanco);
    color: var(--texto);
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

#confirm-button {
    background-color: var(--aqua);
    color: var(--blanco);
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

#confirm-button:hover {
    background-color: var(--celeste);
}

#cancel-button {
    background-color: var(--blanco);
    color: var(--aqua);
    border: 1px solid var(--aqua);
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

#cancel-button:hover {
    background-color: var(--rojo);
    border: 1px solid var(--rojo);
    color: var(--blanco);
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--texto);
}

.close-button:hover {
    color: var(--aqua);
}
.user-data {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

#username-input {
    padding: 8px 14px;
    border: 1px solid var(--borde);
    border-radius: 6px;
    background-color: var(--blanco);
    color: var(--texto);
    font-size: 14px;
    width: fit-content;
}

/*On phones the banner stacks: picture, text and button one under the other*/
@media (max-width: 768px) {
    .profile-header {
        padding: 20px;
    }

    .profile-info {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .profile-op {
        margin-left: 0;
        align-self: center;
    }

    .profile-img {
        width: 140px;
        height: 140px;
    }

    .profile-img-vacia {
        font-size: 60px;
    }

    .user-name {
        font-size: 32px;
    }

    .profile-box {
        margin: 20px 16px;
        padding: 20px;
    }
}