/* Oznamko / Tablo – Frontend CSS */

.ozn-app { max-width: 960px; margin: 0 auto; font-family: inherit; }

/* Login */
.ozn-login-wrap { max-width: 400px; margin: 40px auto; padding: 32px; border: 1px solid #e0e0e0; border-radius: 10px; background: #fff; }
.ozn-school-name { margin: 0 0 4px; font-size: 1.3rem; }
.ozn-order-name { margin: 0 0 20px; font-size: 1rem; color: #555; }
.ozn-deadline { background: #fff8e1; border-left: 4px solid #ffc107; padding: 8px 12px; border-radius: 0 4px 4px 0; margin-bottom: 20px; font-size: .9rem; }

.ozn-field { margin-bottom: 16px; }
.ozn-field label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .9rem; }
.ozn-field input { width: 100%; padding: 9px 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; box-sizing: border-box; }
.ozn-field input:focus { outline: none; border-color: #2271b1; box-shadow: 0 0 0 2px rgba(34,113,177,.2); }
.required { color: #c00; }

.ozn-btn { display: inline-block; padding: 10px 20px; border: none; border-radius: 6px; font-size: 1rem; cursor: pointer; transition: background .15s; }
.ozn-btn-primary { background: #2271b1; color: #fff; }
.ozn-btn-primary:hover { background: #135e96; }
.ozn-btn-outline { background: transparent; border: 1px solid #ccc; color: #444; }
.ozn-btn-outline:hover { background: #f0f0f0; }

.ozn-error { color: #c00; font-size: .9rem; margin-bottom: 12px; padding: 8px 12px; background: #fde8e8; border-radius: 4px; }

/* Selection */
.ozn-selection-header { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.ozn-selection-header h2 { margin: 0; flex: 1; font-size: 1.2rem; }
.ozn-already-submitted { background: #d4edda; border-left: 4px solid #46b450; padding: 10px 16px; border-radius: 0 6px 6px 0; margin-bottom: 20px; }

/* Total price bar */
.ozn-total-price-bar { display: flex; justify-content: space-between; align-items: center; background: #f0f6fc; border: 1px solid #c3d9f2; border-radius: 8px; padding: 12px 20px; margin-bottom: 24px; font-size: 1.1rem; }
.ozn-total-price-bar strong { font-size: 1.3rem; color: #1967d2; }

/* Photo rows */
.ozn-photos-list { display: flex; flex-direction: column; gap: 16px; }
.ozn-photo-row { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 20px; border: 1px solid #e4e4e4; border-radius: 10px; background: #f8f8f8; }

.ozn-photo-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ozn-photo-thumb-wrap {
    width: 100%; overflow: hidden; border-radius: 6px;
    position: relative; cursor: pointer;
}
.ozn-photo-thumb { width: 100%; height: auto; display: block; border-radius: 6px; transition: filter .2s; }
.ozn-photo-thumb-wrap:hover .ozn-photo-thumb { filter: brightness(.85); }
.ozn-photo-thumb-wrap::after {
    content: '🔍';
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    opacity: 0; transition: opacity .2s;
    pointer-events: none;
}
.ozn-photo-thumb-wrap:hover::after { opacity: 1; }
.ozn-photo-filename { font-size: 1rem; font-weight: 700; color: #333; text-align: center; word-break: break-all; order: -1; margin-bottom: 6px; }
.ozn-photo-subtotal { font-size: 1rem; font-weight: 700; color: #1967d2; }

/* Products col */
.ozn-products-col { display: flex; flex-direction: column; gap: 12px; }
.ozn-product-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px; border: 1px solid #f0f0f0; border-radius: 6px; }
.ozn-product-img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.ozn-product-info { flex: 1; }
.ozn-product-name { display: block; font-weight: 600; margin-bottom: 2px; }
.ozn-product-desc { font-size: .85rem; color: #666; margin: 2px 0 4px; }
.ozn-product-price { font-size: .85rem; color: #1967d2; font-weight: 600; }
.ozn-product-qty { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 60px; }
.ozn-product-qty label { font-size: 11px; color: #888; }
.ozn-qty-input { width: 60px; padding: 6px; text-align: center; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; }

/* Contact form */
.ozn-contact-form { margin-top: 32px; padding: 24px; background: #f8f9fa; border-radius: 8px; }
.ozn-contact-form h3 { margin: 0 0 16px; }
.ozn-contact-form .ozn-field { max-width: 400px; }

/* Lightbox */
.ozn-lightbox { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; }
.ozn-lightbox-bg { position: absolute; inset: 0; background: rgba(0,0,0,.88); }
.ozn-lightbox-inner { position: relative; z-index: 1; max-width: 90vw; max-height: 90vh; }
.ozn-lightbox-inner img { max-width: 90vw; max-height: 88vh; object-fit: contain; border-radius: 4px; display: block; }
.ozn-lightbox-close-btn { position: absolute; top: -40px; right: 0; background: none; border: none; color: #fff; font-size: 28px; cursor: pointer; line-height: 1; }

/* Deadline passed */
.ozn-deadline-passed { text-align: center; padding: 60px 20px; color: #555; }

/* School admin */
.ozn-sa-login-wrap { max-width: 400px; margin: 40px auto; padding: 32px; border: 1px solid #e0e0e0; border-radius: 10px; background: #fff; }
.ozn-sa-persons-wrap { max-width: 800px; margin: 0 auto; }
.ozn-sa-persons-wrap h2 { margin-bottom: 8px; }
.ozn-sa-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.ozn-sa-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid #eee; font-size: .85rem; color: #888; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ozn-sa-table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.ozn-sa-table tr.ozn-sa-sent td { background: #f0fff4; }

/* Náhľad v admin školy - prirodzený pomer, max 80px */
.ozn-sa-thumb { width: auto; max-width: 60px; height: auto; display: block; border-radius: 4px; border: 1px solid #eee; }

/* Tlačidlo - preberie štýl témy cez wp button classes, fallback */
.ozn-sa-send-btn {
    display: inline-block; padding: 8px 18px;
    background: var(--wp--preset--color--primary, #2271b1);
    color: #fff; border: none; border-radius: 4px;
    font-size: .9rem; cursor: pointer; transition: opacity .15s;
    text-decoration: none; white-space: nowrap;
}
.ozn-sa-send-btn:hover { opacity: .85; color: #fff; }
.ozn-sa-send-btn.ozn-sa-btn-sent {
    background: var(--wp--preset--color--secondary, #46b450);
}
.ozn-sa-email-input { width: 100%; max-width: 280px; padding: 6px 10px; border: 1px solid #ccc; border-radius: 4px; font-size: .9rem; }

@media (max-width: 640px) {
    .ozn-photo-row { grid-template-columns: 1fr; }
    .ozn-photo-thumb-wrap { width: 100%; height: auto; }
}
