/* Alapvető változók és beállítások */
:root {
    --ios-blue: #007AFF;
    --ios-dark-blue: #0056b3;
    --ios-darker-blue: #004085;
    --ios-gray: #8E8E93;
    --ios-light-gray: #F2F2F7;
    --ios-white: #FFFFFF;
    --ios-black: #000000;
    --ios-red: #FF3B30;
    --ios-green: #34C759;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--ios-light-gray);
    color: var(--ios-black);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigáció és felhasználói menü */
.nav-bar {
    background-color: var(--ios-blue);
    padding: 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-bar-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.nav-bar a, .user-menu-toggle {
    color: var(--ios-white);
    text-decoration: none;
    padding: 10px 8px;
    display: inline-block;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

.nav-bar a:not(:last-child)::after, .user-menu-toggle::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.3);
}

.nav-bar a:hover, .user-menu-toggle:hover {
    opacity: 0.8;
}

.nav-bar a.active, .nav-bar a:focus {
    background-color: var(--ios-darker-blue);
    color: var(--ios-white);
}

/* Felhasználói menü */
.user-menu {
    position: relative;
    display: inline-block;
}

.user-menu-toggle {
    cursor: pointer;
    user-select: none;
    padding: 10px 8px;
    color: var(--ios-white);
    font-weight: 600;
}

.user-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--ios-white);
    border: 1px solid var(--ios-gray);
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 200px;
}

.user-menu-dropdown.active {
    display: block;
}

.user-menu-dropdown a {
    display: block;
    padding: 10px 15px;
    color: var(--ios-black);
    text-decoration: none;
    transition: background-color 0.3s ease;
    user-select: none;
}

.user-menu-dropdown a:hover {
    background-color: var(--ios-light-gray);
}

.close-menu-button {
    display: none;
}

/* Gombok és űrlap elemek */
.button, input[type="file"]::file-selector-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--ios-blue);
    color: var(--ios-white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button:hover, input[type="file"]::file-selector-button:hover {
    background-color: var(--ios-dark-blue);
}

.upload-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--ios-white);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--ios-gray);
    border-radius: 5px;
    font-size: 16px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 12 12'%3E%3Cpath d='M10.293 3.293a1 1 0 011.414 1.414l-5 5a1 1 0 01-1.414 0l-5-5a1 1 0 111.414-1.414L6 7.586l4.293-4.293z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

input[type="file"] {
    padding: 10px;
    border: 1px solid var(--ios-gray);
    border-radius: 8px;
    width: 100%;
}

/* Keresési oldal vezérlők és galéria nézet beállítások */
.image-gallery {
    position: relative;
    margin-top: 20px;
}

.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.zoom-controls {
    display: flex;
    align-items: center;
}

#grid-slider {
    margin-right: 10px;
}

#grid-value {
    font-size: 14px;
    color: var(--ios-gray);
}

.select-all-container {
    display: flex;
    align-items: center;
}

.select-all-container input[type="checkbox"] {
    margin-right: 5px;
}

/* Általános rács elrendezés - mindkét oldalon használt */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

/* Kép konténer - mindkét oldalon használt */
.image-container, .image-item {
    position: relative;
    aspect-ratio: 1/1;  /* Négyzet alakú keret */
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;  /* Világosabb háttér a jobb láthatóságért */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;      /* Flexbox a központosításhoz */
    align-items: center;
    justify-content: center;
}

/* Feltöltés előnézeti képek */
.preview-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Keresési oldal képek megjelenítése */
.gallery-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;    
    height: auto;   
    object-fit: contain;
    display: block;
    padding: 5px;
    transition: transform 0.3s ease;
}

/* PDF előnézet specifikus stílusok */
.pdf-preview {
    height: 150px;  /* Fix magasság */
}

.pdf-preview .preview-content {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.pdf-preview .pdf-icon {
    width: 50%;
    height: 50%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="%23FF0000" d="M181.9 256.1c-5-16-4.9-46.9-2-46.9 8.4 0 7.6 36.9 2 46.9zm-1.7 47.2c-7.7 20.2-17.3 43.3-28.4 62.7 18.3-7 39-17.2 62.9-21.9-12.7-9.6-24.9-23.4-34.5-40.8zM86.1 428.1c0 .8 13.2-5.4 34.9-40.2-6.7 6.3-29.1 24.5-34.9 40.2zM248 160h136v328c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V24C0 10.7 10.7 0 24 0h200v136c0 13.2 10.8 24 24 24zm-8 171.8c-20-12.2-33.3-29-42.7-53.8 4.5-18.5 11.6-46.6 6.2-64.2-4.7-29.4-42.4-26.5-47.8-6.8-5 18.3-.4 44.1 8.1 77-11.6 27.6-28.7 64.6-40.8 85.8-.1 0-.1.1-.2.1-27.1 13.9-73.6 44.5-54.5 68 5.6 6.9 16 10 21.5 10 17.9 0 35.7-18 61.1-61.8 25.8-8.5 54.1-19.1 79-23.2 21.7 11.8 47.1 19.5 64 19.5 29.2 0 31.2-32 19.7-43.4-13.9-13.6-54.3-9.7-73.6-7.2zM377 105L279 7c-4.5-4.5-10.6-7-17-7h-6v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-74.1 255.3c4.1-2.7-2.5-11.9-42.8-9 37.1 15.8 42.8 9 42.8 9z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* PDF felirat */
.pdf-preview .pdf-icon::after {
    content: "PDF";
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: bold;
    color: #FF0000;
}

/* Fájlnév pozicionálás PDF-nél */
.pdf-preview .file-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 5;
}

/* Törlés gomb pozicionálás PDF-nél */
.pdf-preview .remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 10;
}
/* Új, optimalizált Audio Preview stílusok */
.image-item.audio-preview, 
.image-grid .audio-preview {
    aspect-ratio: auto;
    min-height: 40px;
    height: 40px;
    padding: 0;
    margin: 2px 0;
    position: relative;
}

.audio-preview .preview-content {
    height: 40px;
    padding: 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

.audio-preview .preview-content audio {
    width: 95%;
    height: 30px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.audio-preview audio::-webkit-media-controls-panel {
    background-color: #ffffff;
    padding: 0;
    height: 30px;
    display: flex;
    align-items: center;
}

.audio-preview audio::-webkit-media-controls-play-button {
    background-color: var(--ios-blue);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    margin: 0 8px;
}

.audio-preview audio::-webkit-media-controls-timeline,
.audio-preview audio::-webkit-media-controls-current-time-display,
.audio-preview audio::-webkit-media-controls-time-remaining-display,
.audio-preview audio::-webkit-media-controls-mute-button,
.audio-preview audio::-webkit-media-controls-volume-slider,
.audio-preview audio::-webkit-media-controls-volume-control-container,
.audio-preview audio::-webkit-media-controls-toggle-closed-captions-button {
    display: none;
}

.audio-preview .file-name {
    position: absolute;
    left: 40px;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #333;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}

.audio-preview .remove-file {
    top: 50%;
    transform: translateY(-50%);
    right: 5px;
}


/* Videó előnézeti stílusok */
.image-item.video-preview,
.image-grid .video-preview {
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
}

.video-preview .preview-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.video-preview .preview-content video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-preview .file-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 5;
}

@media (max-width: 768px) {
    .image-item.video-preview,
    .image-grid .video-preview {
        min-height: 120px;
    }
}

/* Checkbox és label pozicionálás */
.image-select {
    display: none;
}

.image-select-label {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.7);
    border: 2px solid var(--ios-blue);
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
}

.image-select:checked + .image-select-label {
    background-color: var(--ios-blue);
}

.image-select:checked + .image-select-label::after {
    content: '✓';
    color: var(--ios-white);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Preview konténer alapbeállítások */
.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 10px;
    margin-bottom: 80px;  /* Margó a mentés gomb miatt */
}

/* Általános preview item */
.image-preview-item {
    position: relative;
    width: 100%;
    padding-bottom: 100%;  /* Ez adja meg a négyzet alakot */
    margin-bottom: 10px;
}

/* Előnézeti kép tartalom */
.preview-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.preview-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;  /* cover helyett contain, hogy a teljes kép látszódjon */
    display: block;
}


/* Törlés gomb */
.remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: var(--ios-red);
    border: 2px solid #ffffff;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
}

.remove-file::before {
    content: "×";
    height: 20px;
    line-height: 16px;
}

/* Fájlnév stílus */
.file-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 10px;
    font-family: Arial Narrow, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    background-color: var(--ios-white);
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    text-align: center;
}

.modal-content h2 {
    margin-top: 0;
    color: var(--ios-blue);
}

.modal-content p {
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: var(--ios-white);
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: var(--ios-gray);
    text-decoration: none;
    cursor: pointer;
}

/* Keresés */
#search {
    margin-bottom: 15px;
}

.search-results {
    position: absolute;
    background-color: var(--ios-white);
    border: 1px solid var(--ios-gray);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    width: 100%;
}

.search-results div {
    padding: 10px;
    cursor: pointer;
}

.search-results div:hover {
    background-color: var(--ios-light-gray);
}

/* Kamera és galéria választó */
.image-source-buttons {
    margin-bottom: 20px;
}

/* Általános gomb grid - 5 oszlopra módosítva */
.button-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
    margin-bottom: 20px; /* Alapértelmezett alsó margó */
}

.image-source-button {
    padding: 15px 10px;
    background-color: var(--ios-blue);
    color: var(--ios-white);
    border: none;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: normal;
    min-height: 50px;
    line-height: 1.2;
}

.image-source-button:hover {
    background-color: var(--ios-dark-blue);
}

.image-source-button.active {
    background-color: var(--ios-darker-blue);
}

/* Hangrögzítés gomb - nem kell sortörés */
#audioRecordButton {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#audioRecordButton.recording {
    background-color: #ff4444;
    animation: recordingPulse 2s infinite;
}

#audioRecordButton.recording::after {
    content: "REC";
    display: inline-block;
    margin-left: 8px;
    animation: blink 1s infinite;
}

/* Töltés animáció */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--ios-light-gray);
    border-top: 5px solid var(--ios-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Hangrögzítés konténer */
#audioRecorderContainer {
    display: none;
    margin-bottom: 20px;
}

.recording-timer,
.volume-meter {
    display: none;
}

#audioRecorderContainer.recording .recording-timer,
#audioRecorderContainer.recording .volume-meter {
    display: block;
}

.recording-timer {
    font-size: 24px;
    font-weight: bold;
    font-family: monospace;
    color: #333;
    text-align: center;
    margin: 10px 0;
}

.volume-meter {
    width: 300px;
    margin: 10px auto;
    padding: 5px;
    background: #1a1a1a;
    border-radius: 4px;
    border: 1px solid #333;
}

.led-row {
    display: flex;
    gap: 4px;
    justify-content: space-between;
    padding: 2px;
}

.led {
    width: 20px;
    height: 10px;
    background: #333;
    border-radius: 2px;
    transition: background-color 0.1s ease;
}

.led.active {
    box-shadow: 0 0 5px currentColor;
}

/* LED színek amikor aktívak */
.led.active:nth-child(-n+7) {  /* első 7 LED */
    background: #32CD32;
    color: #32CD32;
}

.led.active:nth-child(n+8):nth-child(-n+10) { /* 8-10 LED */
    background: #FFFF00;
    color: #FFFF00;
}

.led.clip.active { /* utolsó 2 LED */
    background: #FF0000;
    color: #FF0000;
}

/* Animációk */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes recordingPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Üzenet stílusok */
.alert {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    font-weight: bold;
}

.alert-success {
    background-color: var(--ios-green);
    color: var(--ios-white);
}

.alert-error {
    background-color: var(--ios-red);
    color: var(--ios-white);
}

/* Gomb konténer */
.button-container {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.delete-button {
    background-color: var(--ios-red);
}

.delete-button:hover {
    background-color: #D63530;
}

/* Reszponzív beállítások */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .nav-bar-content {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        white-space: nowrap;
    }

    .nav-bar-content::-webkit-scrollbar {
        display: none;
    }
    
    .nav-bar a, .user-menu-toggle {
        padding: 10px 6px;
        font-size: 13px;
    }

    .nav-bar a:not(:last-child)::after, .user-menu-toggle::after {
        right: -1px;
    }

    .button {
        height: 44px;
        line-height: 44px;
        padding: 0 20px;
        margin-bottom: 10px;
    }

    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 5px;
    }

    .image-preview-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    /* Audio és előnézet módosítások mobilon */
    .image-item, 
    .image-grid .image-item {
        aspect-ratio: 1/1;
    }

    /* Új audio preview beállítások mobilon */
    .image-item.audio-preview,
    .image-grid .audio-preview {
        min-height: 36px;
        height: 36px;
    }

    .audio-preview .preview-content {
        height: 36px;
    }

    .audio-preview .preview-content audio,
    .image-grid .audio-preview audio {
        height: 28px;
    }

    .audio-preview audio::-webkit-media-controls-panel {
        padding: 0;
        height: 28px;
    }

    .audio-preview audio::-webkit-media-controls-play-button {
        width: 20px;
        height: 20px;
        margin: 0 6px;
    }

    #search, #frsz {
        font-size: 16px;
    }
    
    #frsz {
        pointer-events: auto;
        -webkit-appearance: menulist-button;
        appearance: menulist-button;
        padding: 10px;
    }

    .image-source-button {
        padding: 12px 15px;
        font-size: 14px;
    }

    /* Keresési képek méretének csökkentése mobilon */
    .image-grid .gallery-image {
        max-width: 90%;    /* Ne töltse ki teljesen a konténert */
        max-height: 90%;   /* Kisebb magasság */
        padding: 2px;      /* Kisebb padding */
        object-fit: contain; /* Teljes kép látszódjon */
    }

    .image-grid .image-container, 
    .image-grid .image-item {
        aspect-ratio: 1/1;  /* Négyzet alakú marad */
        padding: 5px;      /* Egy kis belső térköz */
    }

    /* Felhasználói menü módosítások mobilra */
    .user-menu-dropdown {
        position: fixed;
        top: 40px;
        right: 0;
        width: 200px;
        max-height: calc(100vh - 50px);
        overflow-y: auto;
        background-color: var(--ios-white);
        border: 1px solid var(--ios-gray);
        border-radius: 5px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .user-menu-dropdown a {
        padding: 15px;
        border-bottom: 1px solid var(--ios-light-gray);
        display: block;
        white-space: nowrap;
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        touch-action: manipulation;
    }

    .close-menu-button {
        display: block;
        width: 100%;
        padding: 10px;
        text-align: right;
        color: var(--ios-gray);
        background: none;
        border: none;
        border-bottom: 1px solid var(--ios-light-gray);
        font-size: 20px;
    }

    /* Mobilon a gombok 3 helyett 2 oszlopban jelennek meg */
    .button-grid {
        grid-template-columns: repeat(3, 1fr); /* Mobilon 3 oszlop */
        gap: 8px; /* Kisebb rés a gombok között */
        margin-bottom: 15px; /* Kisebb alsó margó */
    }
    
    /* Ha aktív a hangrögzítés, akkor nagyobb margó */
    #audioRecorderContainer.recording {
        display: block;
        margin-bottom: 60px;
    }

    /* Ha nem aktív a hangrögzítés, akkor kisebb margó */
    #audioRecorderContainer:not(.recording) {
        margin-bottom: 15px;
    }    
    
    .image-source-button {
        font-size: 16px;
    }

    .image-preview-container .preview-content img {
        max-width: 90%;    
        max-height: 90%;   
        padding: 2px;      
        object-fit: contain;
    }

    .image-preview-item {
        aspect-ratio: 1/1;  
        padding: 5px;     
    }    
    
}


/* Print styles */
@media print {
    .nav-bar,
    .user-menu,
    .button-container,
    input[type="file"],
    .modal,
    .zoom-controls {
        display: none !important;
    }

    body {
        background-color: white;
        color: black;
    }

    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .image-grid {
        display: block;
    }

    .image-container,
    .image-item {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }

    .gallery-image {
        max-width: 100%;
        height: auto;
    }
}

/* Egyéb finomítások */
input[type="date"], 
input[type="file"]::file-selector-button {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Akadálymentesség */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--ios-blue);
    outline-offset: 2px;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--ios-light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--ios-gray);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ios-dark-blue);
}

/* Oldalspecifikus stílusok */
.page-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--ios-blue);
}

/* Keresőlap specifikus stílusok */
.search-form {
    max-width: 600px;
    margin: 0 auto;
}

/* Feltöltés oldal specifikus stílusok */
.submit-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
}

#submitButton {
   flex: 1;
   margin-right: 10px;
}

#ftp_upload {
   margin-left: 10px;
}

/* Date inputs */
.date-range-group {
   margin-bottom: 20px;
}

.date-inputs {
   display: flex;
   gap: 10px;
   align-items: center;
}

.date-separator {
   color: var(--ios-gray);
   font-weight: bold;
}

/* Upload progress */
.upload-progress {
   position: fixed;
   bottom: 0;
   left: 0;
   width: 100%;
   background: var(--ios-white);
   box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
   padding: 10px;
   z-index: 1000;
   box-sizing: border-box;
}

.progress-container {
   max-width: 100%;
   margin: 0 auto;
   padding: 0 10px;
}

.progress-text {
   display: flex;
   justify-content: space-between;
   margin-bottom: 5px;
   font-size: 14px;
   font-weight: bold;
   color: var(--ios-gray);
}

.progress-bar-container {
   width: 100%;
   height: 8px;
   background-color: var(--ios-light-gray);
   border-radius: 4px;
   overflow: hidden;
}

.progress-bar {
   height: 100%;
   background-color: var(--ios-blue);
   width: 0;
   transition: width 0.3s ease;
   border-radius: 4px;
}

@media (max-width: 768px) {
   .upload-progress {
      padding: 12px;
   }
   
   .progress-container {
      padding: 0 5px;
   }
   
   .progress-text {
      font-size: 16px;
      margin-bottom: 8px;
   }
   
   .progress-bar-container {
      height: 10px;
   }
}
