/*
 * Kuchyně na míru – styly specifické pro kuchyne.html (půdorys, dekory, nahrávání fotek).
 * Sdílené komponenty konfigurátoru jsou v css/configurator.css.
 */

/*** Půdorys ***/
.kit-plan {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ececec;
}

.kit-plan svg {
    display: block;
    width: 100%;
    height: 100%;
}

@media (max-width: 991.98px) {
    .kit-plan {
        aspect-ratio: auto;
        height: 150px;
        border: 0;
    }
}

/*** Ikony tvarů (půdorys v miniatuře) ***/
.cfg-option .kit-shape {
    background-color: #fff;
    background-size: 44px 44px;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid #e3e3e3;
}

.cfg-option .kit-shape[data-shape="rovna"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Crect x='3' y='3' width='38' height='38' fill='%23faf8f4' stroke='%23353535' stroke-width='2'/%3E%3Crect x='4' y='4' width='36' height='8' fill='%23AB7442'/%3E%3C/svg%3E");
}

.cfg-option .kit-shape[data-shape="l"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Crect x='3' y='3' width='38' height='38' fill='%23faf8f4' stroke='%23353535' stroke-width='2'/%3E%3Crect x='4' y='4' width='36' height='8' fill='%23AB7442'/%3E%3Crect x='4' y='12' width='8' height='20' fill='%23AB7442'/%3E%3C/svg%3E");
}

.cfg-option .kit-shape[data-shape="u"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Crect x='3' y='3' width='38' height='38' fill='%23faf8f4' stroke='%23353535' stroke-width='2'/%3E%3Crect x='4' y='4' width='36' height='8' fill='%23AB7442'/%3E%3Crect x='4' y='12' width='8' height='20' fill='%23AB7442'/%3E%3Crect x='32' y='12' width='8' height='20' fill='%23AB7442'/%3E%3C/svg%3E");
}

.cfg-option .kit-shape[data-shape="paralelni"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Crect x='3' y='3' width='38' height='38' fill='%23faf8f4' stroke='%23353535' stroke-width='2'/%3E%3Crect x='4' y='4' width='36' height='8' fill='%23AB7442'/%3E%3Crect x='4' y='32' width='36' height='8' fill='%23AB7442'/%3E%3C/svg%3E");
}

/*** Dekory dvířek (lamino) ***/
.cfg-swatch .tile.is-decor { background-size: auto; }
.cfg-swatch .tile.decor-bila-mat     { background: linear-gradient(135deg, #f7f7f5, #e9e9e6); }
.cfg-swatch .tile.decor-seda-kasmir  { background: linear-gradient(135deg, #bdb7ae, #9d978e); }
.cfg-swatch .tile.decor-antracit     { background: linear-gradient(135deg, #46484c, #2c2e31); }
.cfg-swatch .tile.decor-cerna-mat    { background: linear-gradient(135deg, #2b2b2b, #171717); }
.cfg-swatch .tile.decor-cappuccino   { background: linear-gradient(135deg, #cfbfaa, #b09e88); }
.cfg-swatch .tile.decor-salvej       { background: linear-gradient(135deg, #9dab95, #7e8d77); }
.cfg-swatch .tile.decor-petrol       { background: linear-gradient(135deg, #3b6b74, #23484f); }
.cfg-swatch .tile.decor-dub-sonoma   { background: repeating-linear-gradient(97deg, rgba(90, 60, 20, .10) 0 2px, transparent 2px 9px), linear-gradient(135deg, #dcc39f, #bfa17a); }
.cfg-swatch .tile.decor-dub-prirodni { background: repeating-linear-gradient(97deg, rgba(80, 50, 15, .12) 0 2px, transparent 2px 8px), linear-gradient(135deg, #cba97a, #a98957); }
.cfg-swatch .tile.decor-dub-tmavy    { background: repeating-linear-gradient(97deg, rgba(0, 0, 0, .16) 0 2px, transparent 2px 8px), linear-gradient(135deg, #6f4c35, #4a3222); }
.cfg-swatch .tile.decor-orech        { background: repeating-linear-gradient(97deg, rgba(0, 0, 0, .14) 0 2px, transparent 2px 7px), linear-gradient(135deg, #7d5537, #5a3a26); }

/*** Nahrávání fotek ***/
.cfg-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    min-height: 150px;
    padding: 1.5rem;
    margin: 0;
    text-align: center;
    background: #fff;
    border: 2px dashed #cfcfcf;
    cursor: pointer;
    transition: border-color .3s, background .3s;
}

.cfg-upload:hover,
.cfg-upload.is-drag {
    border-color: var(--primary);
    background: #fdf8f3;
}

.cfg-upload.is-busy {
    opacity: .6;
    pointer-events: none;
}

.cfg-upload-list {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: .75rem;
}

.cfg-upload-item {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 112px;
}

.cfg-upload-item img,
.cfg-upload-item .cfg-upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 84px;
    object-fit: cover;
    background: #fff;
    border: 1px solid #e3e3e3;
    color: var(--primary);
    font-size: 1.6rem;
}

.cfg-upload-item .cfg-upload-name {
    display: block;
    margin-top: .3rem;
    font-size: .72rem;
    line-height: 1.25;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cfg-upload-item .cfg-upload-name small {
    display: block;
    color: #6c757d;
}

.cfg-upload-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--dark);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

.cfg-upload-remove:hover {
    background: var(--primary);
}

.cfg-upload-counter {
    width: 100%;
    margin: .25rem 0 0;
}
