/* ===========================================
   BASE.CSS - Layout, sidebar, kontroller
   =========================================== */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');

/* ===========================================
   FONTS - Gotham for poster labels
   =========================================== */
@font-face {
    font-family: 'PD-Gotham-Medium';
    src: url('../../../fonts/Gotham-Medium.woff') format('woff'), url('../../../fonts/Gotham-Medium.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'PD-Gotham-Light';
    src: url('../../../fonts/gotham-light-webfont.woff2') format('woff2'), url('../../../fonts/gotham-light-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* ===========================================
   BASE
   =========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #292b2c;
    background-color: #f5f3ec;
    display: flex;
    flex-direction: row-reverse;
    min-height: 100vh;
}

/* ===========================================
   SIDEBAR
   =========================================== */
.sidebar {
    width: 460px;
    min-width: 460px;
    background: #fff;
    padding: 25px 30px;
    overflow-y: auto;
    border-left: 1px solid #e0e0e0;
    box-shadow: -14px 0 18px -18px rgba(0,0,0,0.28);
}

.sidebar h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 25px;
    color: #292b2c;
    text-transform: uppercase;
}

/* ===========================================
   FORM FIELDS
   =========================================== */
.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #87857f;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.field input,
.field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d1d1;
    border-radius: 3px;
    background: #fff;
    color: #292b2c;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: #333744;
}

/* Input with button */
.input-with-btn {
    display: flex;
    gap: 8px;
}

.input-with-btn input {
    flex: 1;
}

.btn-gps {
    padding: 10px 14px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-gps:hover {
    background: #333744;
}

.btn-gps:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.gps-icon {
    width: 16px;
    height: 16px;
}

/* Row layouts */
.row {
    display: flex;
    gap: 12px;
}

.row .field {
    flex: 1;
}

.date-row {
    display: flex;
    gap: 8px;
}

.date-row select {
    flex: 1;
    padding: 12px 10px;
}

.time-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.time-row select {
    width: 80px;
    padding: 12px 10px;
}

.time-row > span {
    color: #292b2c;
    font-size: 16px;
    font-weight: 600;
}

.time-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 35px;
}

.time-toggle span {
    font-size: 11px;
    color: #87857f;
    white-space: nowrap;
}

/* Section titles */
.section-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #87857f;
    margin: 22px 0 10px 0;
    text-transform: uppercase;
}

/* ===========================================
   BUTTONS
   =========================================== */
.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 12px;
    border: 1px solid #d1d1d1;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    color: rgba(51,55,68,0.7);
    transition: all 0.15s ease-in-out;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    border-color: #999;
}

.btn.active {
    background: #333744;
    color: #fff;
    border-color: #333744;
}

/* Color buttons */
.color-btn {
    width: 38px;
    height: 38px;
    border: 2px solid #d1d1d1;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.color-btn:hover {
    border-color: #666;
}

.color-btn.active {
    border-color: #333744;
    box-shadow: 0 0 0 2px #333744;
}

/* Toggle switches */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #e0e0e0;
}

.toggle-row:last-child {
    border-bottom: none;
}

.toggle-row span {
    font-size: 13px;
    color: #292b2c;
}

.toggle {
    width: 48px;
    height: 26px;
    background: #d1d1d1;
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle.active {
    background: #333744;
}

.toggle::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle.active::after {
    left: 24px;
}

.toggle.toggle-small {
    width: 36px;
    height: 20px;
    border-radius: 10px;
}

.toggle.toggle-small::after {
    width: 16px;
    height: 16px;
}

.toggle.toggle-small.active::after {
    left: 18px;
}

/* Order button */
.btn-order {
    width: 100%;
    padding: 15px 20px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-top: 25px;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-order:hover {
    background: #333744;
}

.btn-order-icon {
    width: 20px;
    height: 20px;
}

/* ===========================================
   PREVIEW AREA
   =========================================== */
.preview-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #858585;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 1200px) {
    .sidebar {
        width: 400px;
        min-width: 400px;
        padding: 20px 25px;
    }
}

@media (max-width: 767px) {
    body {
        flex-direction: column-reverse;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }

    .gps-text {
        display: none;
    }

    .preview-area {
        padding: 25px 15px;
        min-height: 480px;
    }

    .btn-order {
        padding: 12px 15px;
        font-size: 13px;
    }
}

@media (max-width: 544px) {
    .preview-area {
        padding: 20px 10px;
        min-height: 400px;
    }

    .sidebar {
        padding: 15px 20px;
    }
}
