﻿/* General Reset */
body {
    min-height: 100vh;
}

.col-w-5 {
    width: 5%;
}

.col-w-10 {
    width: 10%;
}

.col-w-15 {
    width: 15%;
}

.col-w-35 {
    width: 35%;
}

.col-w-40 {
    width: 40%;
}

/* Grid Container */
.layout-wrapper {
    display: grid;
    grid-template-areas:
        "header"
        "content";
    grid-template-columns: auto;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
}

    .layout-wrapper > * {
        padding: 0;
    }

/*Navbar*/
.navbar-icon {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

    .navbar-icon i {
        width: 20px;
        height: 20px;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        font-size: 18px;
    }

.dropdown-menu {
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.create-dropdown-menu {
    z-index: 1050;
}

    .create-dropdown-menu span {
        padding: 0 0.5rem;
        color: #6c757d;
    }

.toggle-btn {
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: left 0.3s ease;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

/*Main Content*/
/*Tickets*/
.card {
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tables-container {
    max-width: 380px;
}

.ticket-stat-card {
    min-width: 0;
    flex: 1 1 0 !important;
}

.requester-name {
    display: inline;
}

.requester-initials {
    display: none;
}

.requested-date {
    display: inline;
}

.requested-date-short {
    display: none;
}

.ticket-actions {
    border-radius: 7px;
    width: 400px;
}

#StatusDropdown {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#statusList li {
    cursor: pointer;
}

#statusList i {
    width: 20px;
    height: 20px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
}

.text-container p:not(.show) {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.customer-email-card {
    background-color: #ececec;
}

.support-email-card {
    background-color: #daecff;
}

.support-note-card {
    background-color: #ffd293;
}

.table-fixed {
    table-layout: fixed;
    min-width: 380px;
}

.ticket-subject {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 35vw;
}

/* Status icon colors */
.ticket-open {
    color: #0d47a1;
}

.ticket-in-progress {
    color: #2e7d32;
}

.ticket-on-hold {
    color: #ef6c00;
}

.ticket-pending {
    color: #7b1fa2;
}

.ticket-resolved {
    color: #1b5e20;
}

.ticket-closed {
    color: #263238;
}

.ticket-reopened {
    color: #ff8f00;
}

.ticket-escalated {
    color: #c2185b;
}

.ticket-rejected {
    color: #c62828;
}

.severity-minor, .priority-low {
    background-color: #28a745;
    color: white;
}

.severity-moderate, .priority-medium {
    background-color: #ffc107;
    color: white;
}

.severity-major, .priority-high {
    background-color: #fd7e14;
    color: white;
}

.severity-critical, .priority-critical {
    background-color: #dc3545;
    color: white;
}

.ticket-details-card {
    position: relative;
    min-height: 1500px;
    max-height: 1500px;
    overflow-y: scroll;
}

.email-container {
    flex-grow: 1;
    overflow-y: auto;
    max-height: calc(100% - 560px);
}

/*.email-reply,
.add-note {
    position: absolute;
    left: 0;
    bottom: 0;
}
*/
.requester-email, .mail-address {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.vr {
    width: 2px;
}

.enter-link {
    width: 300px;
}

/*UserDetails*/
.badge-cancelled {
    background-color: #dc3545;
    color: #fff;
}

.badge-closed {
    background-color: #6c757d;
    color: #fff;
}

.badge-escalated {
    background-color: #ff073a;
    color: #fff;
}

.badge-inprogress {
    background-color: #ffc107;
    color: #212529;
}

.badge-new {
    background-color: #d1e7dd;
    color: #0f5132;
}

.badge-onhold {
    background-color: #dee2e6;
    color: #495057;
}

.badge-open {
    background-color: #20c997;
    color: #fff;
}

.badge-pending {
    background-color: #fd7e14;
    color: #fff;
}

.badge-rejected {
    background-color: #6f42c1;
    color: #fff;
}

.badge-reopened {
    background-color: #0dcaf0;
    color: #000;
}

.badge-resolved {
    background-color: #198754;
    color: #fff;
}

.badge-underreview {
    background-color: #0d6efd;
    color: #fff;
}

.badge-others {
    background-color: #adb5bd;
    color: #fff;
}

.profile-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

/*Mobile View*/
@media(max-width: 767px) {
    .navigation {
        position: fixed;
        height: 100vh;
        top: 0;
        left: 0;
        padding: 15px;
        width: 170px;
        transition: transform 0.3s ease;
        transform: translateX(-100%);
        z-index: 1000;
    }

        .navigation.collapsed {
            transform: translateX(0);
        }

    .toggle-btn {
        position: fixed;
        left: 0px;
        top: 50px;
        transform: rotate(180deg);
    }

        .toggle-btn.collapsed {
            left: 150px;
        }

        .toggle-btn i {
            transition: transform 0.3s ease;
        }

        .toggle-btn.collapsed i {
            transform: rotate(180deg);
        }

    .create-ticket-redirect span, .add-customer-btn span {
        display: none;
    }

    .tables-container {
        max-width: 90vw;
    }

    .ticket-stat-card {
        font-size: 0.85rem;
    }

        .ticket-stat-card .card-body {
            padding: 0.5rem;
        }

    .ticket-table th:nth-child(1),
    .ticket-table td:nth-child(1) {
        display: none;
    }

    .requester-name {
        display: none;
    }

    .requester-initials {
        display: inline;
    }

    .requested-date {
        display: none;
    }

    .requested-date-short {
        display: inline;
    }

    .table-fixed .card-header {
        font-size: 0.85rem;
    }

    .col-sm-w-5 {
        width: 5%;
    }

    .col-sm-w-10 {
        width: 10%;
    }

    .col-sm-w-15 {
        width: 15%;
    }

    .col-sm-w-30 {
        width: 30%;
    }

    .ticket-table {
        table-layout: fixed;
        min-width: 500px;
    }

        .ticket-table .card-header {
            font-size: 0.85rem;
        }
}

/* Tablet View */
@media (min-width: 768px) and (max-width: 1024px) {
    .header {
        padding: 15px;
    }

    .navigation {
        position: fixed;
        height: 100vh;
        top: 0;
        left: 0;
        padding: 15px;
        width: 170px;
        transition: transform 0.3s ease;
        transform: translateX(-100%);
        z-index: 1000;
    }

        .navigation.collapsed {
            transform: translateX(0);
        }

    .toggle-btn {
        position: fixed;
        left: 0px;
        top: 65px;
        transform: rotate(180deg);
    }

        .toggle-btn.collapsed {
            left: 150px;
        }

        .toggle-btn i {
            transition: transform 0.3s ease;
        }

        .toggle-btn.collapsed i {
            transform: rotate(180deg);
        }

    .tables-container {
        max-width: 90vw;
    }

    .email-reply,
    .add-note {
        width: 96%;
        margin: 15px;
    }

    .tables-container {
        max-width: 90vw;
    }
}

/* Desktop View */
@media (min-width: 1025px) {
    .layout-wrapper {
        grid-template-areas:
            "header header"
            "navigation content";
        grid-template-columns: auto 1fr;
    }

    .header {
        padding: 15px;
    }

    .navigation {
        padding: 15px;
        width: 170px;
        transition: width 0.3s ease;
    }

        .navigation.collapsed {
            width: 110px;
        }

            .navigation.collapsed .navbar-icon span,
            .navigation.collapsed .create-button span {
                display: none;
            }

    .toggle-btn {
        position: absolute;
        left: 150px;
        top: 170px;
    }

        .toggle-btn.collapsed {
            left: 90px;
        }


        .toggle-btn i {
            transition: transform 0.3s ease;
        }

        .toggle-btn.collapsed i {
            transform: rotate(180deg);
        }

    .email-reply,
    .add-note {
        width: 96%;
        margin: 15px;
    }

    .centered-div {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .login-form {
        width: 30rem;
    }

    .tables-container {
        max-width: 1200px;
    }

    .centered-div {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .login-form {
        width: 30rem;
    }
}
