/* @media print {
    .rotate-btn {
        display: none !important;
        visibility: hidden !important;
    }
} */


/* Prevent scrolling/panning/zooming on grid while drawing */

.red {
    color: red;
    font-size: 19px;
    font-weight: 600;
}

#grid {
    touch-action: none !important;
    -ms-touch-action: none !important;
    /* for older IE/Edge */
}

.rotate-btn {
    display: none;
    /* default hidden */
}

.rotate-btn.show {
    display: flex;
    /* visible when toggled */
}

@media print {
    .bi.bi-arrows-angle-expand {
        display: none!important;
    }
    /* .rotate-btn,
    .zoom-in-btn,
    .zoom-out-btn {
        display: none !important;
        box-shadow: none !important;
        border: 0 !important;
    }
    .rotate-btn i,
    .zoom-in-btn i,
    .zoom-out-btn i {
        display: none !important;
    } */
}


/* @media print {
    body.printing .rotate-btn,
    body.printing .zoom-in-btn,
    body.printing .zoom-out-btn {
        display: none !important;
    }
} */

body {
    user-select: none;
}

.customer_form-container {
    margin: auto;
}

form p {
    margin-bottom: 10px;
}

.customer_form-section {
    margin-bottom: 15px;
}

.customer_form-label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.customer_form-checklist {
    display: flex;
    flex-direction: column;
}

.customer_form-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.customer_form-table td {
    padding: 5px;
}

.subheading {
    color: #81b300;
    font-weight: bold;
    margin-top: 20px;
}

.smalltext {
    font-size: 11px;
}


/********************
GRID
*******************/

.grid-container {
    display: inline-block;
    width: 100%;
}

.grid {
    display: grid;
    grid-template-columns: 9% repeat(10, 1fr);
    grid-template-rows: 12% repeat(5, 1fr);
    gap: 1px;
    background-color: #ccc;
    width: 100%;
    aspect-ratio: 11 / 6;
    overflow: hidden;
    border: 1px solid #ccc;
}

.grid div {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    position: relative;
}

.grid div[data-index] {
    background-color: #fff;
    /* border: 1px solid #ccc; */
}

.header-cell {
    background-color: #e0e0e0;
    font-weight: normal;
}

.icon-container {
    display: grid;
    gap: 4px;
    max-width: 100%;
    margin-top: 20px;
    grid-template-columns: repeat(8, 1fr);
}

.icon {
    flex: 1 1 calc(20% - 10px);
    text-align: center;
    border: 1px solid #ccc;
    padding: 4px;
    cursor: grab;
    user-select: none;
}

.icon:active {
    cursor: grabbing;
}

.icon.active {
    background-color: #d1e7fd;
    border-color: #007bff;
}

.icon-title {
    font-size: 10px;
    margin-top: 5px;
    line-height: 1.2;
}

.grid svg {
    position: absolute;
    width: 80px;
    height: auto;
}

#grid div {
    box-sizing: border-box;
}

.shape {
    z-index: 1;
    position: absolute;
    /* pointer-events: auto;*/
    box-sizing: content-box;
}

.shape button {
    display: none;
}

.shape input {
    display: block;
    margin: 0;
    border: none;
    min-width: 20px;
    min-height: 30px;
}

.right-border {
    border-right: 2px solid #5cb300;
}

.form-header {
    background-color: #81b300;
    color: white;
    padding: 8px;
}

.form-header .container-md {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.form-header-left {
    display: flex;
    flex-direction: column;
}

.form-header-logo {
    max-height: 50px;
    width: auto;
}

.export-button-row {
    top: 6%;
}

.form-footer {
    background-color: #5cb300;
    color: white;
    padding: 5px 20px;
    margin-top: 0;
}

.form-footer .separator {
    border-left: 2px solid white;
    height: 100%;
    margin: 0 10px;
}

.form-footer .row {
    align-items: center;
}

.form-footer .col-left {
    display: flex;
    align-items: center;
}

.form-footer .col-left span {
    white-space: nowrap;
}

.form-footer .col-right img {
    height: 25px;
}

.form-note-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.form-note-list {
    padding-left: 20px;
    margin-bottom: 10px;
}

.form-note-list li {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.form-note-footer {
    font-size: 0.8rem;
    color: #666;
}

.background-lighgreen {
    background-color: #dcedc8;
    padding: 20px;
}

.green-checkbox {
    width: 13px;
    height: 13px;
    border: 1px solid;
    border-radius: 0 !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    position: relative;
}

.green-checkbox:checked {
    background-color: #5cb300;
    border-color: #5cb300;
}

.grid div img {
    z-index: 9;
}

.col-right {
    display: none;
}

#grid img {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

#grid div>div {
    border: none !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
}

.btn-outline-primary.active {
    background-color: #0d6efd;
    color: white;
}

#deleteModeBtn.active {
    background-color: #dc3545;
    color: white;
}

.shape.text-shape input:focus {
    border-radius: 0;
    border: 1px solid red;
}

.shape.text-shape input::placeholder {
    color: #000;
    opacity: 1;
}


/* YD-17-09-2025 */

.resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #3498db;
    border-radius: 50%;
    z-index: 10;
}

.resize-handle.right {
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    cursor: ew-resize;
}

.resize-handle.bottom {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: ns-resize;
}

@media (max-width: 991px) {
    .right-border {
        border-right: 0;
    }
}

@media (max-width: 768px) {
    .form-footer .col-left {
        flex-direction: column;
        text-align: center;
    }
    .form-footer .separator {
        display: none;
    }
    /* .grid {
grid-template-columns: 9.09% repeat(10, 50px);
grid-template-rows: 9.09% repeat(5, 50px);
overflow: visible;
} */
    .export-button-row {
        position: static;
    }
}

@media (max-width: 620px) {
    .icon-container {
        overflow-x: scroll;
    }
    .txt-small {
        font-size: 10px;
    }
    .form-note-list li {
        font-size: 10px !important;
    }
    .form-note-footer {
        font-size: 10px !important;
    }
    #customerFormSubmit {
        min-width: 100%;
    }
}

@media (max-width: 600px) {
    .form-header-logo {
        max-height: 40px;
        margin-top: 10px;
    }
    .grid-container {
        overflow: scroll;
    }
    /* .grid {
        grid-template-columns: 9.09% repeat(10, 36px);
        grid-template-rows: 9.09% repeat(5, 40px);
    } */
}

@media (max-width: 350px) {
    .form-header .container-md {
        flex-direction: column;
        align-items: center;
    }
}


.shape-controls {
    position: absolute;
    top: -35px;
    right: -35px;
    display: flex;
    gap: 5px;
}
.ctrl-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: white;
    border: 1px solid black;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
  .shape.text-shape input {
            border-radius: 0;
        }
        
        .shape.text-shape input::placeholder {
            color: #000;
            opacity: 1;
        }
        
        #grid div>.shape-inner {
            border: 2px solid black!important;
        }

