/* ====== Wrapper ====== */
#vykupFormWrapper {
    max-width: 1400px;
    margin: 30px auto;
    padding: 25px;
    background: linear-gradient(#e6f0fb, #ffffff 77.73%) !important;
    border: 1px solid #ccd6e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
    font-family: "new_font", sans-serif !important;
}

.form-title {
    font-size: 22px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 5px;
}

.form-subtitle {
    text-align: center;
    font-size: 14px;
    color: #555;
    margin-bottom: 25px;
}

/* ====== Layout řádků ====== */
.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

#vykupFormWrapper .form-group label {
    margin-bottom: 2px !important;
    line-height: 1.6 !important;
    padding: 0 !important;
}

label {
    display: block;
}

/* Inputs */
input,
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccd6e0;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border .3s, box-shadow .3s;
    margin: 0;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #225097;
    box-shadow: 0 0 0 3px rgba(34, 80, 151, .15);
}

textarea {
    resize: vertical;
    min-height: 90px;
}

/* Dynamické boxy */
.dynamic {
    background: #f5f8fc;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin: 20px 0;
}

.dynamic.hidden {
    display: none;
}

#vykupFormWrapper .dynamic h4 {
    font-size: 14px;
    font-weight: 400;
        margin: 0 0 10px 0 !important; /* nahoře 0, dole jen 12px */
    color: #225097;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: "new_font", sans-serif !important;
}

/* Inline skupiny */
.form-inline {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-inline .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* ====== Checkboxy ====== */
.checkbox-classic {
    display: flex;
    flex-wrap: nowrap;
}

.checkbox-classic label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
}

.checkbox-classic label span {
    display: inline-block;
    line-height: 1;
    position: relative;
    top: 1px;
}

.checkbox-classic label:not(:last-child)::after {
    content: "|";
    color: #999;
    margin: 0 12px;
    font-weight: normal;
}

.checkbox-classic input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border: 2px solid #225097;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
    transition: all .2s ease;
}

.checkbox-classic input[type="checkbox"]:hover {
    border-color: #163a6d;
    background: rgba(34, 80, 151, .08);
}

.checkbox-classic input[type="checkbox"]:checked {
    background: #225097;
    border-color: #225097;
}

.checkbox-classic input[type="checkbox"]:checked::after {
    content: "✔";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #fff;
    line-height: 1;
    pointer-events: none;
}

/* ====== Tlačítka ====== */
#vykupFormWrapper button,
#vykupFormWrapper .add-btn,
#vykupFormWrapper .remove-btn {
    font-family: "new_font", sans-serif !important;
    text-transform: uppercase !important;
    background: linear-gradient(180deg, #fefefe, #e3e3e3) !important;
    border: 1px solid #dedede !important;
    border-radius: 5px !important;
    border-color: #b3b3b3 !important;
    color: black !important;
    font-size: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

#vykupFormWrapper .add-btn {
    padding: 6px 14px !important;
    font-size: 13px !important;
}

#vykupFormWrapper button:hover,
#vykupFormWrapper .add-btn:hover,
#vykupFormWrapper .remove-btn:hover {
    background: linear-gradient(180deg, #f3f3f3, #e6e6e6) !important;
    color: #222 !important;
    border-color: #b3b3b3 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-2px) !important;
}

#vykupFormWrapper .remove-btn {
    padding: 6px 14px !important;
    font-size: 13px !important;
    margin-top: 8px !important;
    color: #cc0000 !important;
}

#vykupFormWrapper .remove-btn:hover {
    color: #a00000 !important;
    background: linear-gradient(180deg, #fbeaea, #f5dcdc) !important;
}

/* Rámeček bloků */
.pc-block,
.mobile-block,
.components-block,
.accessory-block,
.notebook-block {
    border: 1px dashed #ccd6e0;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
}

/* Upload input */
input[type="file"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccd6e0;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: border .3s, box-shadow .3s;
}

input[type="file"].uploaded-success {
    border: 2px solid #28a745 !important;
    background-color: #eafaf1 !important;
}

input[type="file"].uploaded-fail {
    border: 2px solid #dc3545 !important;
    background-color: #fcebea !important;
}

input[type="file"]:hover {
    border-color: #225097;
}

input[type="file"]:focus {
    border-color: #225097;
    box-shadow: 0 0 0 3px rgba(34, 80, 151, .15);
}

.upload-msg {
    font-size: 11px;
    margin-top: 4px;
    font-weight: 400;
    color: #225097;
}

.submit-wrapper {
    text-align: left;
    margin-top: 25px;
}

.submit-wrapper button {
    font-size: 16px !important;
    padding: 14px 50px !important;
}

.hint {
    font-size: 12px;
    color: #5c687a;
    font-weight: 400;
}

.upload-label {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}

#uploadStatus {
    font-size: 10px;
    font-weight: 400;
    color: #225097;
    margin-left: 10px;
}

/* ====== Kategorie + Upload ====== */
.form-row.category-row {
    align-items: flex-start;
}

.form-row.category-row .category-select {
    flex: 0 1 240px;
    max-width: 280px;
    min-width: 200px;
}

.form-row.category-row .upload-group {
    flex: 1 1 auto;
    min-width: 0;
}

/* Upload – 4 sloty v jedné řadě */
.upload-multiple {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
}

.upload-multiple .upload-slot-wrapper {
    flex: 1 1 0;
    min-width: 0;
}

.upload-multiple input[type="file"] {
    width: 100%;
    box-sizing: border-box;
}

/* Select */
#vykupFormWrapper .form-group select {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    height: auto !important;
    color: #333 !important;
    background-color: #fff !important;
    padding: 10px 14px !important;
    border: 1px solid #ccd6e0 !important;
    border-radius: 6px !important;
    padding-right: 40px !important;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23225097' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
}

/* ====== Condition groups ====== */
.condition-group,
.comp-condition,
.pc-condition,
.mobile-condition,
.accessory-condition,
.other-condition,
.nb-condition {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-direction: row;
    border-top: 1px dashed #ccd6e0;
    margin-top: 15px;
    padding-top: 10px;
}

.condition-group>label:first-child,
.comp-condition>label:first-child,
.pc-condition>label:first-child,
.mobile-condition>label:first-child,
.accessory-condition>label:first-child,
.other-condition>label:first-child,
.notebook-condition>label:first-child {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ====== Komponenty ====== */
.components-select {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
    padding: 0;
    border-top: 0;
}

.components-select>label:first-child {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
    display: flex;
    align-items: center;
}

.components-select .checkbox-classic {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
}

/* Notebook – 5 polí */
.form-inline.five-cols {
    display: flex;
    gap: 15px;
}

.form-inline.five-cols .form-group {
    flex: 1 1 20%;
}

/* Počítač – 8 polí (2 řádky: 4 + 4) */
.form-inline.eight-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.form-inline.eight-cols .form-group:nth-child(n+5) {
    grid-column: span 1;
}

/* Upload hláška */
.upload-slot-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.upload-slot-wrapper .upload-msg {
    position: absolute;
    top: -22px;
    right: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #225097;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* ====== Mobile ====== */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column !important;
        gap: 0 !important;
        width: 100% !important;
    }

    .form-inline {
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    /* Kategorie + Upload */
    .form-row.category-row {
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
    }

    .form-row.category-row .category-select,
    .form-row.category-row .upload-group {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-bottom: 0px !important;
    }

    /* Co chcete prodat */
    .form-group label[for="category"] {
        margin-top: 25px !important;
        margin-bottom: 0 !important;
    }

    #vykupFormWrapper #category {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        margin-bottom: 0 !important;
    }

    /* Upload fotky */
    .upload-multiple {
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .upload-multiple .upload-slot-wrapper {
        width: 100% !important;
    }

    /* Bloky */
    .dynamic {
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 15px !important;
    }

    .dynamic .form-inline .form-group,
    .dynamic .form-group {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }

    .form-group label {
        margin-top: 10px !important;
        margin-bottom: 4px !important;
        padding-top: 0 !important;
    }

    /* Checkboxy */
    .checkbox-classic input[type="checkbox"] {
        width: 22px !important;
        height: 22px !important;
        border-width: 2px !important;
    }

    .checkbox-classic input[type="checkbox"]:checked::after {
        font-size: 14px !important;
        color: #fff !important;
    }

    /* Stavy */
    .condition-group,
    .comp-condition,
    .pc-condition,
    .mobile-condition,
    .accessory-condition,
    .other-condition,
    .nb-condition {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 14px !important;
        width: 100% !important;
    }

    .condition-group>label:first-child,
    .comp-condition>label:first-child,
    .pc-condition>label:first-child,
    .mobile-condition>label:first-child,
    .accessory-condition>label:first-child,
    .other-condition>label:first-child,
    .nb-condition>label:first-child {
        flex: 1 1 100% !important;
        text-align: center !important;
        margin-bottom: 8px !important;
    }

    /* PC komponenty – grid 2x4 */
    .components-block {
        width: 100% !important;
        margin: 0 0 15px 0 !important;
        padding: 12px !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .components-select {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px 15px !important;
        width: 100% !important;
    }

    .components-select>label:first-child {
        grid-column: 1 / -1;
        text-align: center !important;
        margin-bottom: 8px !important;
    }

    .components-select .checkbox-classic {
        display: contents !important;
    }

    .components-select .checkbox-classic label {
        white-space: nowrap !important;
        font-size: 13px !important;
        line-height: 1.3 !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .components-select .checkbox-classic label::after {
        content: none !important;
    }

    /* Počítač – full width na mobilu */
    .form-inline.eight-cols {
        grid-template-columns: 1fr !important;
    }
}
.component-item {
  border: 1px solid #ccd6e0;
  border-radius: 6px;
  background: #fff;
  padding: 12px 15px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.component-item .component-header {
  font-size: 13px;
  font-weight: 600;
  color: #225097;
  margin-bottom: 8px;
  text-transform: uppercase;
  border-bottom: 1px dashed #ccd6e0;
  padding-bottom: 4px;
}

.component-item .form-group {
  margin-bottom: 12px;
}