﻿
/* ============================================= */
/* BASE STYLES */
/* ============================================= */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
}

/* ============================================= */
/* BOTTOM SIDEBAR (3D SPHERE PREVIEW) */
/* ============================================= */

#sidebarbottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 900;
    background: transparent;
    pointer-events: auto;
}

    #sidebarbottom canvas {
        display: block;
    }




/* ============================================= */
/* SIDEBARS - SPOLOČNÉ ŠTÝLY */
/* ============================================= */
#left-sidebar,
#right-sidebar {
    position: fixed;
    top: 0;
    height: 100%;
    width: 280px;
    background-color: #f2f2f2;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
    padding-top: 50px;
    box-sizing: border-box;
}

/* ============================================= */
/* ĽAVÝ SIDEBAR */
/* ============================================= */
#left-sidebar {
    left: 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
}

    #left-sidebar.open {
        transform: translateX(0);
    }

/* ============================================= */
/* PRAVÝ SIDEBAR */
/* ============================================= */
#right-sidebar {
    right: 0;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    display: none;
    transform: translateX(100%);
}

    #right-sidebar.open {
        display: flex;
        transform: translateX(0);
    }

/* ============================================= */
/* SIDEBAR HEADER & SUBHEADER */
/* ============================================= */
.sidebar-header,
.sidebar-subheader {
    padding: 15px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
    text-align: center;
    font-size: 1.1em;
    color: #333;
}

.sidebar-subheader {
    margin-top: 10px;
}

/* ============================================= */
/* SIDEBAR SCROLLABLE CONTENT */
/* ============================================= */
.sidebar-scrollable-content {
    flex-grow: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
    scrollbar-width: none; /* Firefox */
}

    .sidebar-scrollable-content::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }

/* ============================================= */
/* PROJECT BUTTONS (ĽAVÝ PRAVY SIDEBAR) */
/* ============================================= */
.sidebar-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(100% - 30px);
    padding: 10px;
    margin: 0 15px 10px 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
    .sidebar-button:hover {
        background-color: var(--brand-color);
        opacity: 0.50; /* 👈 jemnejšia, transparentnejšia verzia */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        border-color: var(--brand-color-hover);
    }

        .sidebar-button:hover * {
            color: white !important;
        }

    .sidebar-button.active {
        background-color: var(--brand-color);
        color: white;
        border-color: var(--brand-color);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

        .sidebar-button.active * {
            color: white;
        }

.sidebar-button-image {
    max-width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 8px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.sidebar-button-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.sidebar-button-text {
    flex-grow: 1;
    text-align: left;
    padding-right: 5px;
}


.sidebar-button-text-left {
    max-width: 90%;
    flex-grow: 1;
    text-align: left;
    padding-right: 5px;
}


.sidebar-button-title {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 4px;
    color: #333;
    line-height: 1.2;
}

 



.sidebar-button-parameter {
    font-size: 12px;
    color: #555;
    margin-bottom: 4px;
    line-height: 1.3;
}

.sidebar-button-price {
    font-size: 14px;
    color: #D50000;
    font-weight: bold;
    margin-top: 6px;
}

.sidebar-button-favorite {
    margin-left: 10px;
    color: #ccc;
    font-size: 18px;
    cursor: pointer;
    align-self: flex-start;
}

    .sidebar-button-favorite i.active {
        color: #E60023;
    }

/* ============================================= */
/* OPTION BUTTONS (PRAVÝ SIDEBAR) */
/* ============================================= */
.sidebar-options-grid {
    display: grid;
    gap: 10px;
    padding: 0 15px;
    grid-template-columns: repeat(2, 1fr);
}

.sidebar-option-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

    .sidebar-option-button:hover {
        background-color: #e0e0e0;
        border-color: #bbb;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    }

    .sidebar-option-button.active {
        background-color: var(--brand-color);
        color: white;
        border-color: var(--brand-color);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .sidebar-option-button .option-image {
        max-width: 100%;
        border-radius: 3px;
        border: 1px solid #eee;
        margin-bottom: 5px;
    }

        .sidebar-option-button .option-image.square-ratio {
            width: 100px;
            height: 100px;
            object-fit: cover;
        }

        .sidebar-option-button .option-image.vertical-ratio {
            width: 60px;
            height: 120px;
            object-fit: cover;
        }

    .sidebar-option-button .option-text {
        font-size: 14px;
        font-weight: 500;
    }

/* ============================================= */
/* TOP BUTTONS CONTAINER */
/* ============================================= */
.top-buttons-container {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 90%;
}

    .top-buttons-container button {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px 15px;
        background-color: var(--brand-color);
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        font-size: 14px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        transition: background-color 0.2s ease, transform 0.1s ease;
        min-width: 100px;
    }

        .top-buttons-container button:hover {
            background-color: var(--brand-color-darker);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        }

        .top-buttons-container button:active {
            transform: translateY(0);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .top-buttons-container button .button-text {
            margin-bottom: 5px;
            font-weight: bold;
            font-size: 12px;
            color: white;
            text-transform: uppercase;
        }

        .top-buttons-container button i {
            color: white;
            font-size: 18px;
        }


/* ============================================= */
/* NEXT BUTTONS CONTAINER - UNDO/REDO BUTTONY */
/* ============================================= */
.next-buttons-container {
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 90%;
    margin: 0 auto;
}

    .next-buttons-container button {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 12px 15px;
        background-color: var(--brand-color);
        color: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 14px;
        box-shadow: 0 4px 15px rgba(108, 74, 182, 0.4);
        transition: all 0.3s ease;
        width: 100%;
    }

        .next-buttons-container button:hover:not(:disabled) {
            background-color: var(--brand-color-darker);
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(108, 74, 182, 0.6);
        }

        .next-buttons-container button:active:not(:disabled) {
            transform: translateY(-1px);
        }

        .next-buttons-container button:disabled {
            opacity: 0.3;
            cursor: not-allowed;
            background-color: #ccc;
            box-shadow: none;
        }

        .next-buttons-container button .button-text {
            margin-bottom: 5px;
            font-weight: bold;
            font-size: 12px;
            color: white;
            text-transform: uppercase;
        }

        .next-buttons-container button i {
            color: white;
            font-size: 18px;
        }

/* ============================================= */
/* MENU BUTTON (ĽAVÝ HORNÝ ROŽOK) */
/* ============================================= */
#toggle-left-sidebar-btn {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
    padding: 10px 15px;
    background-color: var(--brand-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-weight: bold;
}

    #toggle-left-sidebar-btn:hover {
        background-color: var(--brand-color-darker);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }

    #toggle-left-sidebar-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

/* ============================================= */
/* RESET BUTTON - ŠPECIÁLNY ŠTÝL */
/* ============================================= */
#resetButton {
    background-color: transparent;
    border: 2px solid var(--brand-color);
    color: var(--brand-color);
}

    #resetButton .button-text,
    #resetButton i {
        color: var(--brand-color);
    }

    #resetButton:hover {
        background-color: var(--brand-color);
        border-color: var(--brand-color);
    }

        #resetButton:hover .button-text,
        #resetButton:hover i {
            color: white;
        }




/* ============================================= */
/* CHANGE DIMENSIONS OVERLAY */
/* ============================================= */
.change-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

    .change-overlay .card {
        max-width: 400px;
        width: 90%;
        background: #2c3031;
        color: #ffffff;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
        animation: popIn 0.3s ease-out;
    }

    .change-overlay h4 {
        font-weight: bold;
        color: var(--brand-color);
    }

    .change-overlay .form-label {
        font-weight: 500;
        color: rgba(255, 255, 255, 0.7);
    }

    .change-overlay input.form-control {
        text-align: center;
        font-weight: bold;
        background-color: rgba(0, 0, 0, 0.2);
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
    }

        .change-overlay input.form-control::placeholder {
            color: rgba(255, 255, 255, 0.4);
        }

    .change-overlay .btn-secondary {
        background-color: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #ffffff;
    }

        .change-overlay .btn-secondary:hover {
            background-color: rgba(255, 255, 255, 0.2);
            border-color: rgba(255, 255, 255, 0.3);
        }

    .change-overlay .btn-primary {
        background-color: var(--brand-color);
        border-color: var(--brand-color);
    }

        .change-overlay .btn-primary:hover {
            background-color: var(--brand-color-darker);
            border-color: var(--brand-color-darker);
        }

@keyframes popIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================= */
/* ERROR/VALIDATION STYLES */
/* ============================================= */
.error-message {
    color: #ff4444;
    font-size: 12px;
    margin-top: 5px;
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.change-overlay input.form-control.error {
    border-color: #ff4444 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 68, 68, 0.25) !important;
}

.change-overlay input.form-control.valid {
    border-color: #44ff44 !important;
}

/* ============================================= */
/* FOCUS STATES */
/* ============================================= */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--brand-color);
}

/* ============================================= */
/* RESPONSIVE - MOBILE */
/* ============================================= */
@media (max-width: 1024px) {
    .top-buttons-container button {
        padding: 8px 12px;
        min-width: 80px;
    }

        .top-buttons-container button .button-text {
            font-size: 10px;
        }

        .top-buttons-container button i {
            font-size: 16px;
        }
}
@keyframes zoomIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}


/* RESPONSIVE */
@media (max-width: 1024px) {
    #interiorSection .card {
        padding: 20px;
        max-width: 95%;
    }

    .interior-variant-btn {
        padding: 12px 15px;
        font-size: 14px;
    }

    #interiorRandom {
        padding: 15px;
        font-size: 15px;
    }
}


/* ============================================= */
/* INTERIÉR BUTTONY - ČISTÁ FIALOVÁ */
/* ============================================= */
.sidebarint-option-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background-color: var(--brand-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    color: white;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 15px rgba(108, 74, 182, 0.4);
}

    .sidebarint-option-button:hover {
        background-color: var(--brand-color-darker);
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(108, 74, 182, 0.6);
    }

    .sidebarint-option-button:active {
        transform: translateY(-1px);
    }

    .sidebarint-option-button .sidebar-button-image {
        max-width: 100%;
        border-radius: 8px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        margin-bottom: 8px;
        background: white;
        padding: 5px;
    }

    .sidebarint-option-button .option-text {
        font-size: 14px;
        font-weight: 600;
        color: white;
    }

    .sidebarint-option-button.active {
        background-color: var(--brand-color-darker);
        border: 2px solid rgba(255, 255, 255, 0.5);
        box-shadow: 0 6px 25px rgba(108, 74, 182, 0.7);
    }


/* Spinner animation CSS */

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobile responsive loading screen */
@media (max-width: 768px) {
    #loading-overlay > div {
        padding: 20px;
    }

    #loading-overlay p:first-of-type {
        font-size: 16px !important;
    }

    #loading-overlay > div > div:nth-child(3) {
        width: 250px !important;
    }
}

@media (max-width: 480px) {
    #spinner {
        width: 50px !important;
        height: 50px !important;
    }

    #loading-overlay p:first-of-type {
        font-size: 14px !important;
    }

    #loading-overlay > div > div:nth-child(3) {
        width: 200px !important;
    }
}





/* ============================================ */
/* THANK YOU OVERLAY - CLEAN STYLE */
/* ============================================ */

/* Overlay pozadie */
.thank-you-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


.thank-you-card {
    background-color: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    animation: fadeInCard 0.5s ease-out;
    border-top: 5px solid var(--brand-color, #6C4AB6);
    text-align: center;
    width: 90%;
    max-width: 460px;
    position: relative;
}

@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.thank-you-card .icon-wrapper {
    background-color: #e8f9f1;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px auto;
    animation: zoomInIcon 0.6s ease-out 0.2s both;
}

@keyframes zoomInIcon {
    from {
        opacity: 0;
        transform: scale(0);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.thank-you-card .icon-wrapper .bi {
    color: #2ecc71;
    width: 45px;
    height: 45px;
}


.thank-you-card h1 {
    color: #2c3e50;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 10px;
    animation: fadeInText 0.5s ease-out 0.3s both;
}


.thank-you-card .lead {
    font-weight: 400;
    color: #555;
    font-size: 1rem;
    margin-bottom: 20px;
    animation: fadeInText 0.5s ease-out 0.4s both;
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.thank-you-card hr {
    width: 80px;
    margin: 0 auto 20px auto;
    border: 0;
    border-top: 2px solid #e0e0e0;
    animation: fadeInText 0.5s ease-out 0.5s both;
}


.thank-you-card .next-steps {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 25px;
    animation: fadeInText 0.5s ease-out 0.6s both;
}

 
.thank-you-card .email-info {
    color: var(--brand-color, #6C4AB6);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 25px;
    animation: fadeInText 0.5s ease-out 0.7s both;
}

    .thank-you-card .email-info i {
        margin-right: 8px;
    }


.btn-close-thank-you {
    display: inline-block;
    padding: 12px 40px;
    font-weight: 600;
    border-radius: 50px;
    border: 2px solid var(--brand-color, #6C4AB6);
    background-color: transparent;
    color: var(--brand-color, #6C4AB6);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    animation: fadeInText 0.5s ease-out 0.8s both;
}

    .btn-close-thank-you:hover {
        background-color: var(--brand-color, #6C4AB6);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(108, 74, 182, 0.3);
    }


@media (max-width: 767px) {
    .thank-you-card {
        width: 95%;
        padding: 30px 20px;
        border-radius: 15px;
    }

        .thank-you-card h1 {
            font-size: 1.75rem;
        }

        .thank-you-card .icon-wrapper {
            width: 70px;
            height: 70px;
        }

            .thank-you-card .icon-wrapper .bi {
                width: 35px;
                height: 35px;
            }

    .btn-close-thank-you {
        padding: 10px 30px;
        font-size: 0.95rem;
    }
}


/* PORTRAIT - výška väčšia ako šírka */
@media (orientation: portrait) {
    #right-sidebar {
        display: none !important;
    }

    #toggle-left-sidebar-btn {
        display: block !important;
    }
}

@media (max-width: 1024px) {
    /* SKRYŤ tieto buttony na mobile */
    #resetButton,
    #changeCabinetButton {
        display: none !important;
    }

    /* RIGHT SIDEBAR = VYPNUTÝ */
    #right-sidebar {
        display: none !important;
    }

    /* TOGGLE MENU = VŽDY ZAPNUTÝ */
    #toggle-left-sidebar-btn {
        display: block !important;
    }

    .top-buttons-container {
        margin-left: 70px; /* priestor pre menu */
        justify-content: flex-end !important;
        padding-right: 5px; /* 👈 5px od pravého okraja */
        gap: 8px;
    }

    #toggleButton,
    #randomInteriorButton,
    #saveProjectButton {
        flex: 0 0 auto; /* 👈 NEPRUŽNÉ - NESKÁČE! */
        width: 140px; /* 👈 FIXNÁ ŠÍRKA */
        font-size: 12px;
        padding: 8px 12px;
    }


        #randomInteriorButton .button-text,
        #toggleButton .button-text,
        #saveProjectButton .button-text {
            font-size: 11px;
        }

}


/* ============================================= */
/* LOADING OVERLAY */
/* ============================================= */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--brand-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease;
}

.loading-content {
    text-align: center;
    color: white;
    display: flex; /* 👈 PRIDANÉ */
    flex-direction: column; /* 👈 PRIDANÉ */
    align-items: center; /* 👈 PRIDANÉ */
    justify-content: center; /* 👈 PRIDANÉ */
}

/* ============================================= */
/* SPINNER */
/* ============================================= */
#spinner {
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid #f0f0f0;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px; /* 👈 PRIDANÉ - centruje a pridáva medzeru */
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center; /* 👈 PRIDANÉ */
}

.progress-bar {
    width: 300px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto 10px;
}

#progress-fill {
    height: 100%;
    background: white;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

#loading-percent {
    font-size: 14px;
    opacity: 0.8;
    text-align: center; /* 👈 PRIDANÉ */
}


/* ============================================= */
/* TOP BUTTONS */
/* ============================================= */

#toggle-left-sidebar-btn {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1100;
    padding: 10px 15px;
    background: var(--button-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

    #toggle-left-sidebar-btn:hover {
        background: var(--button-hover);
    }
