:root {
    --primary-color: #2d6a4f;
    --secondary-color: #343a40;
    --background-color: #f8f9fa;
    --text-color: #1b4332;
    --white: #ffffff;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --script-header-bck: linear-gradient(to right, #2980b9, #BC6C25);

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background-color);
    line-height: 1.6;
    color: var(--text-color);
    overflow-y: scroll;
}

.app-container {
    min-height: 100vh;
    max-width: 100vw;
    margin: 0 auto;
}

.head-banner {
    display: flex;
    justify-content: space-between;
    left: 0;
    padding: 2px 2px;
    align-items: center;
    background: #2c3e50;
    height: 50px;
    color: var(--white);
    position: sticky;
    top: 0px;
    z-index: 101;
}

.head-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 250px;
}

.head-logo h3 {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.5em;
}

.head-logo h4 {
    font-size: 10px;
    opacity: 0.9;
}

.searchbar-group {
    display: flex;
    gap: 0.2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.15rem;
    border-radius: 12px;
}

#channel-selection {
    background: transparent;
    border: none;
    color: var(--white);
    padding: 0.2rem;
    cursor: pointer;
    border-radius: 12px;
    padding: 0.5rem;
}

#channel-selection option {
    background: var(--primary-color);
    color: var(--white);
}

#search-input {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 0.1rem 0.2rem;
    border-radius: 12px;
    color: var(--white);
    width: 200px;
}
.search-clear-btn {
    position: absolute;
    right: 45px; /* Position it just before the search button */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    display: none; /* Hidden by default */
    z-index: 10;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.search-clear-btn:hover {
    color: #333;
    background-color: rgba(0, 0, 0, 0.05);
}

/* Ensure the parent container has position: relative for proper positioning */
.searchbar-group {
    position: relative;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#search-action {
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 0 0.2rem;
    transition: var(--transition);
}

#search-action:hover {
    transform: scale(1.1);
}

.quick-link button {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.quick-link a {
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 10px;
}

.quick-link button:hover {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.script-canvas-reset button {
    background: linear-gradient(135deg, #d3167e, #db4734);
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: #000000;
}
 
.script-canvas-reset button:hover {
    background: linear-gradient(135deg, #eb0404, #fc0707);
    color: #ffffff;
}


.agent-user-input {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.1rem 0.5rem;
    border-radius: 12px;
}

.customer-input {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    background: rgba(28, 146, 101, 0.76);
    padding: 0.1rem 0.5rem;
    border-radius: 12px;
}

#customer {
    background: transparent;
    border: none;
    color: var(--white);
    padding: 0.3rem;
}

#user {
    background: transparent;
    border: none;
    color: var(--white);
    padding: 0.3rem;
}

#user::placeholder {
    color: rgba(255, 255, 255, 0.7);
}
#customer::placeholder {
    color: rgba(247, 247, 247, 0.932);
}

.app-body {
    display: flex;
}

.side-panel {
    position: sticky;
    padding-left: 5px;
    padding-right: 5px;
    width: 80px;
    background: #2c3e50;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: calc(100vh - 50px);
    top:50px;
    padding-top: 50px;
}

.nav-item {
    justify-content: center;
    padding: 12px;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    border-radius: 12px;
    margin-left: 5px;
    flex-direction: row;
    position: relative;
    transition: all 0.3s ease;
    align-items: center;
}

.nav-item #links-page-action {
    background: linear-gradient(135deg, #08552b, #2ccfba);
    border-radius: 8px;
    padding: 8px;
}
.nav-item h3{
    font-size: 10px;
}

.nav-item.active{
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px 0px 0px 12px;
}

.nav-item:hover{
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px 0px 0px 12px;
}

.nav-item button {
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.nav-tooltip {
    position: fixed; /* Changed to fixed for better positioning */
    left: -9999px;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.nav-tooltip::before {
    content: '';
    position: absolute;
    left: -6px; /* Changed from right to left */
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent #2c3e50 transparent transparent;
    z-index: 1000;
}
.nav-tooltip.visible {
    opacity: 1;
    transform: translateX(0);
    z-index: 1000;
}

.main-page{
    flex: 1;
    background: linear-gradient(to right,  var(--secondary-color), var(--primary-color));
}
.sub-page{
    display: none;
}
.sub-page.active{
    display: block;
}
.script-nav-container {
    justify-content: space-evenly;
    padding-top: 4px;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 2px;
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    background: #3a5c5a;
    border-bottom: 8px solid #2c3e50;
    top:50.2px;
    position: sticky;
    flex-wrap: wrap;
    z-index: 100;
    flex: 1;
}

.script-nav-container button {
    font-size: 12px;
    padding: 6px;
    margin: 2px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: var(--background-color);
    cursor: pointer;
    transition: var(--transition);
}

.script-nav-container button :nth-child(17),
.script-nav-container button :nth-child(16),
.script-nav-container button :nth-child(15) {
    font-size: 14px;
}

#C-Sat\ Scripts-nav{
    background: #d9ff00;
    color: #000000;
}
#C-Sat\ Scripts-nav.active{
    background: #BC6C25;
}

#Exchange\ and\ Cancellation\ Tips-nav{
    background: #014883;
}
#Exchange\ and\ Cancellation\ Tips-nav.active{
    background: #BC6C25;
}

#General\ Scripts-nav{
    background: #02a14a;
}
#General\ Scripts-nav.active{
    background: #BC6C25;
}

#ETG\ Chat\ Scripts-nav{
    background: #8684e5;
}

#ETG\ Chat\ Scripts-nav.active{
    background: #BC6C25;
}

#ETG\ Voice\ Scripts-nav{
    background: #03a67a;
}

#ETG\ Voice\ Scripts-nav.active{
    background: #BC6C25;
}
#B\.COM\ Chat\ Scripts-nav{
    background: #5e9249;
}

#B\.COM\ Chat\ Scripts-nav.active{
    background: #BC6C25;
}


.script-nav-container button.active {
    background: #BC6C25;
    color: var(--white);
}

.script-nav-container button:hover:not(.active) {
    background: var(--secondary-color);
    color: var(--white);
}
.script-canvas{
    background: transparent;
}
.script-module{
    display: none;
}
.script-module.active{
    display: grid;
    grid-template-columns: 1fr 3fr;
    padding: 5px;
    margin: 2px;
    border-radius: 8px;
}
.script-title-chat{
    display: none;
}
.script-title-chat.active{
    grid-column: 1;
    display: flex;
    flex-direction: column;
    border: 2px solid #2c3e50;
    border-radius: 8px;
    background: linear-gradient(to right, #2980b9, #BC6C25);
    border-radius: 20px 0 0 20px;
    padding: 10px;
    text-align: center;
    justify-content: space-around;
    color: #ffffff;
    font-size: 12px;
}
.script-title-chat p{
    font-size: 11px;
    font-weight: 500;
    font-style: italic;
    padding-top: 5px;
    color: #c5fff5;
}
.script-title-voice{
    display: none;
}
.script-title-voice.active{
    grid-column: 1;
    display: flex;
    flex-direction: column;
    border: 2px solid #2c3e50;
    border-radius: 8px;
    background: linear-gradient(to right, #2980b9, #BC6C25);
    border-radius: 20px 0 0 20px;
    padding: 12px;
    text-align: center;
    justify-content: space-around;
    color: #ffffff;
    font-size: 11px;
}
.script-title-voice p{
    font-size: 10px;
    font-style: italic;
    padding-top: 5px;
    color: #ffffff;
    font-weight: 400;
}


.script-card-sub{
    display: none;
}
.script-card-sub.active{
    grid-column: 2;
    display: flex;
    flex-direction: column;
    background: transparent;
}
.card-module{
    border-radius: 0 20px 20px 0;
    flex-grow: 1;
    text-align: left;
    gap: 2px;
    border: 2px solid #343a40;
    background: #ffffff;
    padding: 8px 15px 8px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #000000;
    align-content: center;
}

.card-module:hover{
    transform: translateX(5px);

}

.freeflow-header{
    padding-top: 4px;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 2px;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    background: #3a5c5a;
    border-bottom: 8px solid #2c3e50;
    top:50.2px;
    position: sticky;
    text-align: center;
    color: #ffffff;
    font-size: 14px;
    vertical-align: middle;
}
.freeflow-input {
    align-content: center;
    z-index: 0;
}
.freeflow-input textarea{
    background: #ffffff;
    position: fixed;
    top:100px;
    width: 92%;
    height: calc(100vh - 150px);
    padding: 10px;
    border-radius: 8px;
    margin: 10px;
    color: #000000;
    font-size: 14px;
    resize: none;
}

.freeflow-input ::placeholder{
    color: #000000;
}


/*Check-List*/


.check-list-nav-container {
    padding-top: 4px;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 2px;
    display: flex;
    gap: 0.5rem;
    background: #3a5c5a;
    border-bottom: 8px solid #2c3e50;
    top:50.2px;
    position: sticky;
    flex-wrap: wrap;
    z-index: 101;
    flex: 1;
}

.check-list-nav-container button {
    font-size: 12px;
    padding: 6px;
    margin: 2px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: var(--background-color);
    cursor: pointer;
    transition: var(--transition);
}

#Automated\ Void-nav{
    background: #02a14a;
}
#Automated\ Exchange-nav{
    background: #02a14a;
}
#Automated\ Cancel-nav{
    background: #02a14a;
}

.check-list-nav-container button.active {
    background: #BC6C25;
    color: var(--white);
}

.check-list-nav-container button:hover:not(.active) {
    background: var(--secondary-color);
    color: var(--white);
}
/* Checklist Styles */
.checklist-canvas {
    width: 100%;
    padding: 10px;
    background-color: linear-gradient(135deg, #2c3e50, #3498db);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.checklist-module {
    display: none;
    width: 100%;
}

.checklist-module.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    background: #3498db;
    padding: 5px;
    border: 2px solid #3498db;
    border-radius: 8px;
}

.checklist-header h3 {
    font-size: 14px;
    color: #ffffff;
    font-weight: 600;
}

.reset-checklist {
    background-color: #e7881c;
    border: 1px solid #e7881c;
    border-radius: 4px;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    color: #ffffff;
    font-size: 12px;
}

.reset-checklist:hover {
    background-color: #fa1909;
}

.reset-checklist i {
    color: #ffffff;
}

.checklist-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
    color: #ffffff;
}

.checklist-table th {
    background-color: #4682B4;
    color: white;
    padding: 6px 10px;
    font-size: 12px;
    text-align: center;
    font-weight: 500;
    border: 2px solid #000000;
    border-collapse: collapse;
}

.checklist-table td {
    padding: 3px 5px;
    border-bottom: 1px solid #eee;
    border: 1px solid #000000;
    text-align: center;
    border-collapse: collapse;
    background: #ffffff;
    color: #000000;
}

.checklist-table tr:hover {
    background-color: #cfcd3a;
    color: #d9ff00;
}

.checkbox-column {
    text-align: center;
}

.checkbox-cell {
    text-align: center;
}

.step-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.step-title {
    font-weight: 500;
}

/* Important warnings/notes styling */
tr[data-step-number="1"] .step-title,
.step-title:contains("!!!") {
    color: #dc3545;
    font-weight: bold;
}

.completed-step .important-text {
    background: #28a808;
}

.completed-step td {
    background: #28a808;
}

.completed-step .step-title {
    background: #28a808;
}

.amadeus-content p,
.sabre-content p {
    margin: 0;
    padding: 2px 0;
    font-family: monospace;
}

.links-btn-container{
    align-content: center;
}

/* Animation for switching between checklists */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add some styling to the navigation buttons for consistency */
.listnav-btn {
    padding: 8px 15px;
    margin: 0 5px 10px 0;
    border: none;
    border-radius: 4px;
    background-color: #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.listnav-btn:hover {
    background-color: #e0e0e0;
}

.listnav-btn.active {
    background-color: #4682B4;
    color: white;
}

.check-list-nav-container {
    display: flex;
    flex-wrap: wrap;
    padding-bottom: 10px;
}

/* Making the table responsive */
@media (max-width: 768px) {
    .checklist-table {
        display: block;
        overflow-x: auto;
    }
    
    .checklist-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .reset-checklist {
        align-self: flex-end;
    }
}
