﻿/*Req Side Preview User story #53773 changes Start*/
#previewIcon {
    position: fixed;
    right: 23px;
    cursor: pointer;
}

    #previewIcon .icon-svg {
        width: 36px;
        height: 36px;
        display: block;
    }

    /* slash hidden by default */
    #previewIcon::after {
        content: '';
        position: absolute;
        top: 45%;
        left: 7%;
        width: 90%;
        height: 3px;
        background: #ffffff;
        transform: rotate(-45deg);
        border-radius: 2px;
        display: none;
        pointer-events: none;
    }

/* 🔥 show slash when preview is open */
#mainContentAndSidebarWrapper.preview-open #previewIcon::after {
    display: block;
}

body:not(.view) #mainContent {
    display: flex;
    width: 100%;
    transition: all 0.4s ease;
}

/* FORM */
#formPanel {
    width: 100%;
    transition: width 0.4s ease;
}

/* PREVIEW */
#previewPanel {
    width: 0;
    overflow: hidden;
    transition: width 0.4s ease;
    border-left: 2px solid #ccc;
    border-top: 2px solid #ccc;
    margin-top: 130px;
    height: 78%;
    background: #fff;
    z-index: 10001;
    position: fixed;
    right: 0;
    top: 0;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
}

.iframeouter {
    border-radius: 10px;
    flex: 1;
}
/* OPEN STATE */
#mainContentAndSidebarWrapper.preview-open #formPanel, #mainContentAndSidebarWrapper.preview-open #formPanel .reqTitleSection .ts-tabContainer {
    width: 50%; /* moves form to left */
}

#mainContentAndSidebarWrapper.preview-open #previewPanel {
    width: 50%; /* preview slides in */
}

#previewPanel iframe {
    width: 100%;
    height: 100%;
}

/* Overlay center fix */
.tgmodal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center; /* vertical center */
    justify-content: center;
    z-index: 10001;
}

/* Modal height control */
.tglistmodal {
    width: 780px;
    height: 420px;
    background: #fff;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.25s ease;
}

.tgmodal-overlay.show .tglistmodal {
    transform: translateY(0);
    opacity: 1;
}

.tgmodal-header {
    display: flex;
    align-items: center; /* vertical center */
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
}
/* Body fills remaining space */
.tgmodal-body {
    flex: 1;
    padding: 10px 24px;
}

/* Two column layout */
.list-container {
    display: flex;
    gap: 30px;
    height: 100%;
}

/* Scroll area */
.list-scroll {
    border-radius: 8px;
    padding: 10px;
    height: 210px;
    overflow: auto;
    flex-direction: column;
}

/* Checkbox row */
.tg-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

/* Footer stays fixed */
.tgmodal-footer {
    padding: 10px 25px;
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    border-bottom: 1px solid #e5e5e5;
}

.btn-secondary {
    padding: 10px 22px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
}

.btn-primary {
    padding: 10px 22px;
    border-radius: 8px;
    border: none;
    background: #0b63f6;
    color: #fff;
    cursor: pointer;
}

/* Label */
.edit-icon {
    cursor: pointer;
    margin-left: 6px;
}


.tgmodal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 4px;
}

.tg-label {
    padding: 8px 8px 4px 8px;
    font-size: 15px;
    font-weight: bold;
}

.tg-label-header {
    justify-content: space-between;
    display: flex;
    align-items: center;
}

p.tg-label-text {
    --tw-text-opacity: 1;
    font-size: 0.75rem;
    line-height: 1rem;
    padding: 0px 0px 8px 8px;
}

.tg-label-header .tg-list-button {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    --tw-bg-opacity: 1;
    --tw-border-opacity: 1;
    border-width: 1px;
    border-radius: 0.5rem;
    gap: 0.5rem;
    align-items: center;
    display: flex;
    cursor: pointer;
    text-transform: none;
    position: relative;
    right: 10px;
    background: none;
}

.full-width {
    width: 100%;
}

/* Two-column layout */
#availableList.two-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* TWO COLUMNS */
    gap: 12px 40px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.tg-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    gap: 10px;
}

    /* Hide native checkbox */
    .tg-checkbox input {
        opacity: 0;
        cursor: pointer;
    }

    /* Custom checkbox */
    .tg-checkbox .checkmark {
        width: 18px;
        height: 18px;
        border: 2px solid #333;
        border-radius: 6px; /* curved corners */
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #fff;
        transition: all 0.2s ease;
    }

        /* Check icon */
        .tg-checkbox .checkmark::after {
            content: "✓";
            font-size: 18px;
            color: #333;
            display: none;
        }

    /* Checked state */
    .tg-checkbox input:checked + .checkmark::after {
        display: block;
    }

    /* Optional hover effect */
    .tg-checkbox:hover .checkmark {
        border-color: #000;
    }

a.tgmodal-unselectall {
    position: fixed;
    left: 380px;
}

a.tgmodal-selectall {
    position: fixed;
    left: 300px;
}
/* Text spacing */
.tg-checkbox .label-text {
    line-height: 1.2;
}

.preview-open #formPanel #mainForm #layoutContainer .sectionColumnsContainer .column1, .preview-open #formPanel #mainForm #layoutContainer .sectionColumnsContainer .column2, .preview-open #formPanel #mainForm #layoutContainer .sectionColumnsContainer .column3 {
    width: 95% !important;
}
.preview-open .questionLabel {
    position: relative !important;
    text-align: left !important;
    width: 100% !important;
}
.tg-empty-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 250px; /* adjust if needed */
    width: 100%;
}

.tg-empty-message {
    font-size: 16px;    
    text-align: center;
}
.disabled-link {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}
#availableList.hiddentwolayout {
    display: none !important;
}
.list-scroll.no-scroll {
    overflow: hidden !important;
    max-height: none !important;
}
/*Req Side Preview User story #53773 changes Ends*/
