/* ============================================
   Tile Joint Filler Visualizer - Standalone CSS
   Works on any WordPress Theme
   ============================================ */

/* Root Variables for Visualizer */
:root {
    --primary1: 253, 185, 46; /* #FDB92E */
    --primary2: 48, 81, 160;  /* #3051A0 */
    --baseColor: 30, 30, 30;  /* #1E1E1E */
    --color_white: 255, 255, 255;
    --color_gray: 245, 245, 245;
}

.joint-filler-visualizer {
    font-family: 'Roboto', sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI";
    color: #1e1e1e;
    width: 100%;
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
}

.joint-filler-visualizer * {
    box-sizing: border-box;
}

.joint-filler-visualizer .container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* ---- Left Column / Sidebar ---- */
.joint-filler-visualizer .left-column {
    background-color: #FDB92E;
    background-color: rgb(var(--primary1));
    height: 100%;
    min-height: 100%;
}

.joint-filler-visualizer .bg-clr-1 {
    background-color: #FDB92E !important;
    background-color: rgb(var(--primary1)) !important;
}

/* Grid & Layout Fallbacks */
.joint-filler-visualizer .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
}

.joint-filler-visualizer .row.gx-0 {
    margin-right: 0;
    margin-left: 0;
}

.joint-filler-visualizer .row.gx-0 > * {
    padding-right: 0;
    padding-left: 0;
}

@media (min-width: 992px) {
    .joint-filler-visualizer .col-lg-3 {
        flex: 0 0 auto;
        width: 25%;
        max-width: 25%;
    }
    .joint-filler-visualizer .col-lg-9 {
        flex: 0 0 auto;
        width: 75%;
        max-width: 75%;
    }
}

@media (max-width: 991px) {
    .joint-filler-visualizer .col-lg-3,
    .joint-filler-visualizer .col-lg-9 {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }
}

/* Utilities Fallbacks */
.joint-filler-visualizer .p-3 { padding: 1rem !important; }
.joint-filler-visualizer .pb-2 { padding-bottom: 0.5rem !important; }
.joint-filler-visualizer .mb-0 { margin-bottom: 0 !important; }
.joint-filler-visualizer .mb-2 { margin-bottom: 0.5rem !important; }
.joint-filler-visualizer .mb-3 { margin-bottom: 1rem !important; }
.joint-filler-visualizer .mb-4 { margin-bottom: 1.5rem !important; }
.joint-filler-visualizer .mt-3 { margin-top: 1rem !important; }
.joint-filler-visualizer .h-100 { height: 100% !important; }
.joint-filler-visualizer .position-relative { position: relative !important; }
.joint-filler-visualizer .text-center { text-align: center !important; }
.joint-filler-visualizer .text-white { color: #ffffff !important; }
.joint-filler-visualizer .list-unstyled { padding-left: 0; list-style: none; }
.joint-filler-visualizer .fw-normal { font-weight: 400 !important; }
.joint-filler-visualizer .border-bottom { border-bottom: 1px solid rgba(255, 255, 255, 0.4) !important; }

/* Buttons */
.joint-filler-visualizer .btn {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    transition: color .15s ease-in-out, background-color .15s ease-in-out;
}

.joint-filler-visualizer .btn-success {
    color: #fff;
    background-color: #198754;
    border-color: #198754;
}

.joint-filler-visualizer .btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

.joint-filler-visualizer .btn-link {
    font-weight: 400;
    color: #fff;
    text-decoration: underline;
    background: transparent;
    border: none;
}

.joint-filler-visualizer .left-column .joint-wrap {
    background-color: #ffffff;
    background-color: rgb(var(--color_white));
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 1px 15px rgba(0, 0, 0, 0.05);
}

.joint-filler-visualizer .left-column .joint-wrap h5 {
    color: #494949;
    font-size: 1.15rem;
    font-weight: 400;
    margin: 0 0 0.75rem;
}

/* ---- Color Swatches ---- */
.joint-filler-visualizer .joint-wrap .colors {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.joint-filler-visualizer .joint-wrap .colors li {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--bgClr);
    cursor: pointer;
    border: 1px solid rgba(30, 30, 30, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
}

.joint-filler-visualizer .joint-wrap .colors li:hover {
    transform: scale(1.15);
}

.joint-filler-visualizer .joint-wrap .colors li.active {
    box-shadow: 0 0 0 4px #EDE9E9;
}

/* ---- Room Filter Category Wrappers ---- */
.joint-filler-visualizer .room-filter-category-wrapper {
    width: 100%;
    position: relative;
}

.joint-filler-visualizer .joint-filler-wrap,
.joint-filler-visualizer .tile-size-wrap,
.joint-filler-visualizer .tile-angle-wrap,
.joint-filler-visualizer .room-surface-wrap {
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.joint-filler-visualizer .room-surface-wrap {
    border-bottom: none;
    margin-bottom: 0.5rem;
}

.joint-filler-visualizer h5 {
    font-size: 1rem;
    font-weight: 500;
    color: #1e1e1e;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.joint-filler-visualizer .form-check-inline {
    display: inline-flex;
    align-items: center;
    margin-right: 0.85rem;
    margin-bottom: 0;
    cursor: pointer;
}

.joint-filler-visualizer .form-check-input {
    margin-right: 0.35rem;
    cursor: pointer;
}

.joint-filler-visualizer .form-check-label {
    font-size: 0.9rem;
    font-weight: 400;
    color: #1e1e1e;
    cursor: pointer;
    margin-bottom: 0;
}

/* ---- Upload Image Wrapper ---- */
.joint-filler-visualizer .upload-image-selection-wrapper {
    border: 1px dashed #1e1e1e;
    border-radius: 20px;
    padding: 15px;
    margin-top: 15px;
}

.joint-filler-visualizer .upload-image-selection-wrapper h5 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.joint-filler-visualizer .upload-image-selection-wrapper .input-group {
    position: relative;
    width: 100%;
}

.joint-filler-visualizer .upload-image-selection-wrapper .images {
    width: 100%;
    font-size: 0.85rem;
    cursor: pointer;
    background-color: transparent;
    border: none;
    padding: 0;
    color: #1e1e1e;
}

/* ---- Right Column & Room View ---- */
.joint-filler-visualizer .right-column {
    position: relative;
    background-color: #fff;
    overflow: hidden;
    height: 100%;
}

.joint-filler-visualizer .color-name-wrap {
    margin-bottom: 0;
    font-size: 16px;
    position: absolute;
    right: 15px;
    top: 15px;
    z-index: 10;
}

.joint-filler-visualizer .color-name-wrap span {
    display: flex;
    margin-left: auto;
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #ffffff;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.joint-filler-visualizer .room-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    perspective: 420px;
    height: 800px;
    background: #e9ecef;
}

/* ---- Tile Block (Floor Mode) ---- */
.joint-filler-visualizer .tile-block {
    position: absolute;
    left: 0;
    right: 0;
    width: 805px;
    height: 590px;
    bottom: -35px;
    margin: 0 auto;
    overflow: hidden;
    background-color: #D2B189;
    transform: rotateX(257deg) translateX(0px) translateY(26px) scaleX(1.5);
    z-index: 1;
    transition: background-color 0.3s ease;
}

.joint-filler-visualizer .tile-block:before {
    top: 0;
    left: 0;
    width: 100%;
    content: '';
    height: 100%;
    opacity: 0.6;
    position: absolute;
    background-size: contain;
    background-position: center;
    background-repeat: repeat;
    pointer-events: none;
}

/* ---- Tile Block (Wall Surface Mode) ---- */
.joint-filler-visualizer .room-wrapper.room-wall-surface .tile-block {
    width: 1100px;
    height: 54%;
    bottom: auto;
    top: 0;
    transform: rotateX(0deg) translateX(0px) translateY(0) scaleX(1);
}

/* ---- Tile Block (Rectangle Shape Mode) ---- */
.joint-filler-visualizer .rectangle .tile-block {
    height: 611px;
    bottom: -92px;
    transform: rotateX(257deg) translateX(0px) translateY(100px) scaleX(1.35);
}

.joint-filler-visualizer .rectangle .tile-block .tile {
    width: 180px !important;
    height: 58px !important;
}

/* ---- Tile Wrap & Tiles Grid ---- */
.joint-filler-visualizer .tile-wrap {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-around;
    position: relative;
    width: 100%;
}

.joint-filler-visualizer .tile {
    margin: 0.5px;
    flex: 1 0 auto;
    height: auto;
    position: relative;
    background-color: #ffffff;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.joint-filler-visualizer .tile:before {
    content: '';
    float: left;
    padding-top: 100%;
}

.joint-filler-visualizer .tile img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- Room Overlay Picture ---- */
.joint-filler-visualizer img.room-pic {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 5;
    pointer-events: none;
}

/* ---- Upload & Croppie Modal ---- */
.joint-filler-visualizer #upload-image {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.joint-filler-visualizer #upload-image-i {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.joint-filler-visualizer .cropped_image {
    font-weight: 500;
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 991px) {
    .joint-filler-visualizer .left-column {
        height: auto;
        min-height: auto;
    }
    .joint-filler-visualizer .room-wrapper {
        height: 550px;
    }
}

@media (max-width: 767px) {
    .joint-filler-visualizer .room-wrapper {
        height: 450px;
    }
    .joint-filler-visualizer .tile-block {
        width: 100%;
        transform: rotateX(257deg) translateX(0px) translateY(26px) scaleX(1.2);
    }
}