/* External styles for alugar.php */
body {
    background-color: rgb(123, 203, 230);
    color: white;
    font-family: Inter, Arial, sans-serif;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* make sizing predictable so elements touch correctly */
*, *::before, *::after { box-sizing: border-box; }

/* size variables: change these base values and overlays will scale by 50% using calc() */
:root {
    /* doubled sizes (previous values were half of these) */
    --locker-min-width: 120px; /* reduzido para caber mais lockers e menos espaço */
    --locker-height: 110px;    /* reduzido proporcionalmente */
    --locker-overlay-font: 32px; /* ajustado */
    --locker-ident-font: 20px; /* ajustado */
}

header {
    text-align: center;
    margin: 20px 0 10px 0;
}

.card-logo {
    text-align: center;
    margin-bottom: 14px;
}
.card-logo img { max-width: 240px; height: auto; display: inline-block; }

/* Centered card */
.card {
    width: 100%;
    max-width: 680px;
    background: rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(11, 78, 150, 0.18);
    backdrop-filter: blur(6px);
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.form-row label.title {
    font-size: 12px;
    color: #000000;
    font-weight: 600;
    text-align: left;
    margin-bottom: 4px;
}

select, button {
    padding: 10px 12px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
}

select {
    background: #ffffff;
    color: #0b1632;
    box-shadow: inset 0 1px 2px rgba(16,24,40,0.06);
}

button {
    background: linear-gradient(180deg, #2563eb, #1e40af);
    color: white;
    cursor: pointer;
    margin-top: 6px;
    transition: transform .12s ease, box-shadow .12s ease;
}

button:hover { transform: translateY(-2px); }

h1 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 20px;
    color: #000000;
}

.form-actions { text-align: right; }

@media (max-width: 520px) {
    .card { padding: 16px; margin: 12px; }
    select { font-size: 14px; }
}
/* Grid of lockers */
.box-grid {
    width: 100%;
    max-width: 980px;
    margin-top: 12px;
    background: #ffffff; /* white background so grid gaps appear white */
    border-radius: 8px;
    padding: 0 !important; /* remove todo o padding externo */
    box-shadow: 0 6px 18px rgba(11,78,150,0.12);
}

.box-grid h2 { margin: 0; color: #000; font-size: 16px; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 0px;
    margin: 0;
    align-items: stretch;
    grid-auto-rows: calc(var(--locker-height) / 2);
    max-height: calc(4 * var(--locker-height) / 2 + 15px); /* 4 rows + gap */
    overflow-y: auto;
}

/* ensure cards exactly fill grid cells with no gaps */
.grid > .locker-card {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.locker-card {
    background: transparent; /* show image background fully, avoid white gaps */
    color: #0b1632;
    padding: 0 !important; /* remove padding so content touches edges */
    border-radius: 0 !important; /* avoid gaps caused by rounded corners */
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: 13px;
    box-shadow: none;
    display: flex;
    align-items: stretch;
    justify-content: center;
    margin: 0; /* ensure no external spacing */
    position: relative; /* allow absolute overlays positioned relative to the card */
    transition: box-shadow 0.15s, border 0.15s;
}

.locker-card.selected {
    box-shadow: 0 0 0 3px #2563eb;
    border: 2px solid #2563eb;
    z-index: 2;
}

.locker-card .locker-img-wrapper {
    position: relative;
    width: 100%;
    height: 100%; /* fill the locker-card height */
    display: block;
    overflow: hidden;
}

.locker-card .locker-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* fill the card neatly */
    display: block;
}

.locker-card .locker-badge { display:none; }

/* new: image background with centered identificador */
.locker-card .locker-image-bg {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    /* show the entire image without cropping */
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    padding: 0 !important; /* ensure image touches card edges */
}

.locker-card .locker-ident-center {
    color: #ffffff;
    background: rgba(0,0,0,0.25); /* subtle backdrop so text is readable */
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    font-size: calc(var(--locker-ident-font) / 2);
    line-height: 1;
    max-width: 95%;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* hide old bottom/top overlay if present */
.locker-card .locker-identificador-overlay { display: none !important; }

/* identificador overlay inside the locker image */
.locker-card .locker-identificador-overlay {
    position: absolute;
    left: 50%;
    bottom: 6px; /* position at the bottom */
    top: auto;
    transform: translateX(-50%);
    display: inline-block; /* behave like a small tag */
    background: #2563eb; /* blue background */
    color: #ffffff !important; /* white text */
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: calc(var(--locker-ident-font) / 2); /* exactly 50% */
    line-height: 1;
    max-width: calc(100% - 16px);
    width: auto; /* do not stretch to full width */
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    box-sizing: border-box;
    z-index: 3;
    pointer-events: none;
}

/* prominent centered number overlay */
.locker-card .locker-number-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.55);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 900;
    font-size: calc(var(--locker-overlay-font) / 2); /* exactly 50% */
    line-height: 1;
    box-sizing: border-box;
}

.locker-card .locker-identificador {
    display:none; /* moved to overlay inside image */
}
.locker-empty { color: rgba(255,255,255,0.9); padding: 12px; }
