@import url('https://fonts.googleapis.com/css?family=Poppins:100,200,300,400,500,600,700,800,500i,900,900i');

:root {
  --main_colour: #5B4595;

}

/*Make any selected text by the user purple with white text */
::selection {
    background: var(--main_colour);
  color:#ffffff;
}


/* Reset some default styles */
body, h1, h2, h3, p {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #e3e6ed;
    overflow-x: hidden;
}

a {
    color: #5B4595;
}

a:hover {
    color: #8c6be3;
}

/* Adjustments in main.css */
.chart-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.chart-container canvas {
    flex-grow: 1;
    width: 100% !important;
    height: 100% !important;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    height: 100vh;
    box-sizing: border-box;
}

.main-content {
    flex-grow: 1;
    background-color: #e3e6ed;
    border-radius: 10px;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 20px;
}

.company-info {
    display: flex;
    align-items: center;
}

.header-logo-hello {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    align-content: center;
    align-items: center;
    gap: 20px;
}

.company-info img {
    border-radius: 50%;
    height: 40px;
    margin-left: 10px;
    width: 40px;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-switch label {
    background-color: #ccc;
    border-radius: 20px;
    cursor: pointer;
    height: 20px;
    position: relative;
    width: 40px;
}

.toggle-switch label::after {
    background-color: #fff;
    border-radius: 50%;
    content: '';
    height: 18px;
    left: 1px;
    position: absolute;
    top: 1px;
    transition: 0.3s;
    width: 18px;
}

.toggle-switch input:checked + label {
    background-color: #5B4595;
}

.toggle-switch input:checked + label::after {
    left: 21px;
}

/* Section Container */
.section-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.section-item {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
}

.section-item.full-width {
    flex: 1 1 100%;
}

.section-item.two-thirds {
    flex: 2 1 50%;

}

.section-item.half-width {
    flex: 1 1 40%;

}

.section-item.one-third {
    flex: 1 1 25%;
}

.section-item.quater {
    flex: 2 1 20%;

}
.dash_reivews, .dash_scans, .dash_total_devices, .dash_satisfaction {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    color: white;
    min-height: 100px;
    flex: 1 1 20%;
}

.dash_reivews {
    background-color: #30A952;
}

.dash_scans {
    background-color: #557DBF;
}

.dash_total_devices {
    background-color: #EA4736;
}

.dash_satisfaction {
    background-color: #F9BC13;
}

.dash_left {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dash_number {
    font-size: 30px;
    font-weight: 500;
    margin-bottom: 10px;
}

.dash_description {
    font-size: 14px;
}

.dash_right .dash_icon {
    width: 80px;
    height: 80px;
    filter: invert(1);
    margin-bottom: 10px;
}

/* Container to manage the layout */


/* Group styles */
.dash_group {
    display: flex;
    flex: 1 1 45%;
    justify-content: space-between;
    gap: 20px;
}

/* Styles for mobile screens */
@media (max-width: 768px) {
  .current-rating {
      order: -1 !important; /* Move the gauge rating section to the top */
  }
  .dash_group {
      display: flex;
      flex: 1 1 100%;
      justify-content: space-between;
      gap: 20px;
  }
    .dash_reivews, .dash_scans, .dash_total_devices, .dash_satisfaction {
        flex: 1 1 100%;
        flex-direction: column;
        align-items: center;
    }

    .dash_right {
        order: -1;
        margin-bottom: 10px;
    }

    .dash_number {
        font-size: 25px;
    }

    .dash_description {
        font-size: 12px;
    }

    .dash_left, .dash_right {
        width: 100%;
        text-align: center;
        align-items: center;
    }

    .dash_right .dash_icon {
        width: 60px;
        height: 60px;
        filter: invert(1);
        margin-bottom: 0px;
    }
}



/* Ensure consistent navigation width */
.sidebar {
    width: 250px; /* Adjust as needed */
    flex-shrink: 0;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    margin: 0;
}

.section-header .qr-open-modal-btn {
    padding: 8px 16px;
    background-color: #5B4595;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.section-header .qr-open-modal-btn:hover {
    background-color: #8c6be3;
}

/* This determines the order the dash is displayed */
.ratings-section {
    order: 1;
}

.current-rating {
    order: 2;
}

.qr-codes {
    order: 3;
}

.recent-feedback {
    order: 4;
}

/* QR Codes */
.qr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qr-codes table {
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
}

.qr-codes th, .qr-codes td {
    border-bottom: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.qr-codes th {
    background-color: #f4f4f4;
}

.qr-thumbnail img {
    height: 50px;
    width: 50px;
}

.qr-preview-tooltip {
    display: none;
    position: absolute;
    width: 150px;
    height: 150px;
    z-index: 1000;
    background-color: white;
    border: 1px solid #888;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    padding: 30px;
}

.qr-thumbnail:hover .qr-preview-tooltip {
    display: block;
}

.qr-popup {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.qr-popup-content {
    background-color: #fefefe;
    margin: 100px auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    text-align: center;
}

.qr-popup-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.qr-popup-close:hover,
.qr-popup-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.qr-popup-content img {
    width: 100%;
    height: auto;
    max-width: 400px;
}

/* Smaller Toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 25px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:focus + .slider {
    box-shadow: 0 0 1px #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
        overflow-y: auto; /* Add this line */
    }

    .main-content {
        padding: 10px;
        overflow-y: visible; /* Ensure content is visible */
    }

    .section-container {
        flex-direction: column;
        flex-wrap: nowrap;
        overflow-x: hidden;
    }

    .section-item {
        width: 100%;
        margin-right: 0;
    }

    .sidebar {
        width: 100%;
        border-radius: 10px;
        margin-bottom: 20px;
    }

    .top-nav {
        flex-direction: row;
        align-items: flex-start;
    }

    .company-info {
        margin-top: 10px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-header button {
        margin-top: 10px;
    }

    /* Display order for dash on the mobile */
    .ratings-section {
        order: 2;
    }

    .current-rating {
        order: 1;
    }

    .qr-codes {
        order: 3;
    }

    .recent-feedback {
        order: 4;
    }
}



/*Feedback Container */
.feedback-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feedback-output {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    background-color: #f9f9f9;
    gap: 15px;
}

.feedback-left {
    flex: 0 0 50px;
}

.feedback-right {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;

}

.feedback-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.feedback-user {
    color: #333;
    font-weight: 500;
}

.protected-icon {

    height: 21px;
}

.feedback-message {
    color: #555;
    margin-top: 10px;
    margin-bottom: 10px;
}

.feedback-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feedback-rating img {
    width: 16px; /* Smaller size for stars */
    height: 16px;
}

.feedback-time {
    color: #888;
    font-size: 12px;
}
#recent_feedback_section{
  order:2;
}
