html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* =====================================================
   STUDENT PHOTO HOVER — TABLE-SAFE FINAL FIX
   ===================================================== */

/* Wrapper only around thumbnail */
.photo-hover-wrapper {
    position: relative;
    display: inline-block;
    line-height: 0; /* prevents extra row height */
}

    /* Thumbnail image — HARD CAPPED */
    .photo-hover-wrapper > img {
        display: inline-block;
        width: 40px;
        height: 40px;
        max-width: 40px;
        max-height: 40px;
        object-fit: cover;
        border-radius: 5px;
    }

/* Preview container — NEVER affects layout */
.photo-preview {
    position: fixed !important; /* removed from table flow */
    display: none !important; /* hidden by default */
    width: 90px; /* CHANGED: 50% bigger */
    height: 120px; /* CHANGED: 50% bigger */
    top: -9999px; /* CRITICAL: no layout calc */
    left: -9999px; /* CRITICAL */
    z-index: 9999;
    background: #fff;
    border: 1px solid #ccc;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    pointer-events: none; /* avoids hover flicker */
}

    /* Preview image forced to container only */
    .photo-preview img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Show preview ONLY on hover */
.photo-hover-wrapper:hover > .photo-preview {
    display: block !important;
    top: calc(12px + 3cm); /* CHANGED: 5 cm niche */
    left: calc(12px + 6cm); /* CHANGED: 5 cm right */
}
