﻿/* General Reset */
body {
    min-height: 100vh;
}

/* 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);
}

.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;
}

/* 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 {
    height: 1000px;
    position: relative;
}

.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-onhold {
    background-color: #dee2e6;
    color: #495057;
}

.badge-inprogress {
    background-color: #ffc107;
    color: #212529;
}

.badge-new {
    background-color: #d1e7dd;
    color: #0f5132;
}

.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;
    }

    .table-responsive {
        overflow-x: scroll;
    }

    .tables-container {
        max-width: 400px;
    }

    .table {
        min-width: 600px;
        border-collapse: collapse;
    }

        .table th,
        .table td {
            white-space: nowrap;
        }
}

/* Tablet View */
@media (min-width: 768px) and (max-width: 1023px) {
    .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);
        }

    .email-reply,
    .add-note {
        width: 96%;
        margin: 15px;
    }
}

/* Desktop View */
@media (min-width: 1024px) {
    .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;
    }
}
