/* Drag & Drop Visual pro CF7 GDrive Upload */
.gdrive-custom-upload {
    position: relative !important;
    display: block !important;
    margin-bottom: 30px !important;
    width: 100% !important;
    min-height: 180px !important;
}

/* 
   NAPROSTO KLÍČOVÉ: Necháme input tam kde je, 
   ale roztáhneme ho přes CELOU plochu obalu a dáme mu opacity 0.
   Tím pádem na něj prohlížeč přirozeně reaguje (klik i drop).
*/
.gdrive-custom-upload input[type="file"].wpcf7-file {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 20 !important; /* Musí být úplně nahoře */
    display: block !important;
}

.gdrive-drop-zone {
    border: 2px dashed #ccd0d4;
    border-radius: 15px;
    padding: 50px 20px;
    text-align: center;
    background: #fcfcfc;
    transition: all 0.25s ease-in-out;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10; /* Pod inputem */
}

/* Reakce boxu, když myš najede nad "neviditelný" input */
.gdrive-custom-upload:hover .gdrive-drop-zone {
    border-color: #2271b1;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Třída přidávaná přes JS při přetažení souboru */
.gdrive-drop-zone.dragover {
    border-color: #2271b1;
    background: #f0f6fb;
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(34,113,177,0.15);
}

.gdrive-drop-zone h4 {
    margin: 0 0 12px 0 !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    color: #1d2327 !important;
}

.gdrive-drop-zone p {
    margin: 0 !important;
    color: #646970 !important;
    font-size: 17px !important;
}

/* Náhledy */
.gdrive-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
    width: 100%;
    justify-content: center;
    position: relative;
    z-index: 5; /* Pod inputem, aby nepřebíjely click */
}

.gdrive-preview-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 3px solid #fff;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

/* Schování originálního popisku CF7 pokud existuje */
.wpcf7-form-control-wrap {
    display: block;
}

/* Fix pro točící se kolečko a zprávy */
.wpcf7-spinner {
    margin: 20px auto !important;
    display: block !important;
    visibility: hidden;
}

.wpcf7-form.submitting .wpcf7-spinner {
    visibility: visible !important;
}

.wpcf7-response-output {
    margin: 20px 0 !important;
    padding: 15px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    text-align: center !important;
    position: relative !important;
    z-index: 100 !important;
    clear: both !important;
    display: none;
    border: 2px solid #2271b1 !important;
    background: #f0f6fb !important;
    color: #2271b1 !important;
}

.wpcf7-form.submitting .wpcf7-response-output {
    display: block !important;
}
