* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    height: calc(100vh - 80px);
}

main {
    display: flex;
    height: 100%;
    width: 100%;
}

aside {
    width: 280px;
    display: flex;
    flex-direction: column;
    height: 100%;
    font-size: 1.1rem;
    background-color: transparent;
}

aside::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, #333 50%, transparent 100%);
}

.links {
    display: flex;
    flex-direction: column;
    margin: 30px auto auto; /* auto */
    gap: 5px;
    padding: 0 5px;
}

aside li {
    list-style-type: none;
    display: flex;
    gap: 10px;
    padding: 20px;
    color: #212529;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition-duration: 0.2s;
    border-radius: 10px;
}

aside li:has(h1) {
    margin-bottom: 20px;
}

aside li:hover {
    background-color: #eee;
}

aside li::after {
    position: absolute;
    width: 100%;
    left: 0px;
    height: 2px;
    background: linear-gradient(to left, transparent, #ffffff24, transparent);
    content: '';
    bottom: 0px;
}

aside li i {
    font-size: 1.3rem;
}

@media screen and (max-width: 990px) {
    aside {
        display: none;
    }
}

.active-link {
    background-color: #eee;
}

.swiper {
    flex: 1;
    height: calc(100vh - 80px);
    width: 80vw;
    overflow: hidden;
    background-color: transparent;
}

.swiper-slide {
    width: 100%;
    background-color: transparent;
    height: 100%;
    overflow: auto;
}

.content {
    width: 100%;
    padding: 32px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.welcome {
    display: grid;
    gap: 15px;
    background-color: rgb(205, 223, 249);
    max-width: 1200px;
    width: 100%;
    padding: 32px;
    border-radius: 1rem;
    margin-bottom: 32px;
}

@media screen and (max-width: 768px) {
    .welcome {
        transform: translate(-32px, -32px);
        width: calc(100% + 64px);
        border-radius: 0;
        padding: 20px;
    }
}

.upcoming-events {
    margin-bottom: 40px;
}

.upcoming-events span {
    line-height: 1.75rem;
    font-weight: 600;
    font-size: 1.25rem;
    color: #212529;
}

.create-event {
    border-bottom: 1px solid rgb(186, 200, 219);
    padding: 1.5rem 0px 2rem;
}

.create-event a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #007bff;
    border: 0.125px solid #007bff;
    border-radius: 1.5rem;
    color: #fff;
    gap: 0.5rem;
    max-width: 100%;
    outline: none;
    padding: 0.625rem 0.9375rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5rem;
    transition: 0.3s;
}

.create-event a:hover {
    background-color: #0056b3;
}

.services {
    padding: 25px 0;
    display: grid;
    gap: 20px;
}

.services .services-list {
    display: inline-flex;
    gap: 15px;
    flex-wrap: wrap;
}

.services .service-name {
    padding: 20px 25px;
    background-color: rgb(205, 223, 249);
    border-radius: 1.5rem;
    border: 1px solid #777;
    font-size: 16px;
}



.my-events {
    border-bottom: 1px solid rgb(186, 200, 219);
    margin-bottom: 1rem;
    padding: 1.5rem 0 0;
}

.my-events h1 {
    margin-bottom: 1rem;
}

.btn-container {
    display: flex;
    overflow: auto;
    scrollbar-width: 0;
}

.btn-container button {
    display: flex;
    align-items: center;
    background: none;
    outline: 0px;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.125rem;
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 600;
    border: 2px solid transparent;
    transition: color 0.125s;
    color: rgb(82, 82, 82);
    user-select: none;
}

.btn-container button:hover {
    color: rgb(18, 18, 18);
}

.btn-container button:not(:last-child) {
    margin-right: 0.5rem;
}

.active-event-tab {
    text-decoration: underline;
    color: rgb(18, 18, 18) !important;
}

.events-list {
    width: 100%;
}

.event-tab {
    display: grid;
    height: 100%;
    width: 100%;
    gap: 1rem;
}

.req-ser-cont {
    width: 100%;
    padding: 20px;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* #services-info-block {
    display: flex;
    gap: 1rem;
    align-items: center;
}
#services-info-block hr {
    flex-grow: 1;
    border: 1px solid black;
    height: 0;
}
#services-info-block a {
    cursor: pointer;
}
#services-info-block a:hover{
    text-decoration: underline;
} */

.service-request {
    background-color: rgb(205, 223, 249);
    padding: 1.5rem;
    font-size: 1rem;
    line-height: 1.5rem;
    border: 2px solid #777;
    border-radius: 2rem;
    height: fit-content;
    width: fit-content;
}


.cancel-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #f44336;
    color: white;
    font-size: 16px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cancel-button:hover {
    background-color: #d32f2f;
    transform: scale(1.1);
}

.request-card.removing {
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.request-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    /* margin-bottom: 15px; */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 401px;
    min-width: 400px;
    font-family: Arial, sans-serif;
}
.request-header {
    margin-bottom: 15px;
}
.request-header h3 {
    margin: 0;
    font-size: 20px;
}
.request-header p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}
.request-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.detail-item {
    font-size: 14px;
}
.detail-item strong {
    color: #333;
}
.location {
    color: #007bff;
}

.services-cont {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    height: fit-content;
}

/* max width 569px - request card full width, services under, dotted line between requests*/
@media screen and (max-width: 503px) {
    .req-ser-cont {
        padding: 0;
    }

    .request-card {
        width: 100%;
        max-width: 500px;
        min-width: 100px;
    }
}




.account-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.account-container h1 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.account-container h2 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #555;
}

.account-form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Adjust the gap between form elements */
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

/* Make form fields responsive */
.third-width {
    flex: 1;
    min-width: 30%;
}

.half-width {
    flex: 1;
    min-width: 45%; /* Adjust to fit within the row */
}

.full-width {
    flex-basis: 100%;
}

.account-container label {
    font-size: 14px;
    margin-bottom: 5px;
    color: #666;
}

.account-container input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.supplier-section {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.account-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: vertical;
    font-size: 16px;
}





.chat-content {
    max-width: calc(100% - 300px);
    flex-grow: 1;
    height: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1rem;
}

#chat {
    flex-grow: 1;
    border: 1px solid #ccc;
    overflow-y: auto;
    scrollbar-width: 0;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.message-box {
    border-radius: 7.5px;
    padding: 6px 7px 8px 9px;
    width: fit-content;
}

.other-message {
    background-color: #f0f0f0;
    color: #080809;
}

.my-message {
    background-color: #006ed4;
    color: #fff;
}

.date-separator {
    padding: 5px 12px;
    color: #65686c;
    background-color: transparent;
    margin: 0 auto;
    font-size: 12px;
    font-weight: 500;
}

#sender-info {
    display: inline-flex;
    max-width: 100%;
    font-size: 13px;
    line-height: 22px;
    font-weight: 500;
}
#sender-info .name {
    color: #187ba5;
    min-width: 8ch;
    padding-right: 0.25rem;
    flex: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    vertical-align: baseline;
}
#sender-info .business-info {
    font-size: 11px;
    white-space: nowrap;
    margin-left: auto;
    flex: none;
    font-weight: normal;
    color: #8696a0 !important;
    letter-spacing: 1px;
    vertical-align: baseline;
}

.message-box > div:has(.message) {
    font-size: 14.5px;
    line-height: 20px;
    vertical-align: baseline;
}

.message-box > div:has(span.time) {
    margin: -10px 0 -5px 4px;
    position: relative;
    z-index: 10;
    float: right;
    line-height: 15px;
}

.time-placeholder {
    height: 0;
    padding: 0 4px;
    display: inline-flex;
    font-size: 0.6875rem;
    line-height: 15px;
    visibility: hidden;
}
.time-placeholder span {
    flex-shrink: 0;
    flex-grow: 0;

}

.time {
    color: #65686c;
    font-size: 0.6875rem;
}

.my-message .time {
    color: rgba(255, 255, 255, 0.7);
}

.message-input-cont {
    display: flex;
    gap: 0.5rem;
    position: sticky;
    bottom: 16px;
}
#message-input {
    max-width: 100%;
    flex-grow: 1;
    padding: 0.25rem;
}
.message-input-cont button {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
}

.choose-chat {
    width: 300px;
    height: 100%;
    height: 100%;
    background-color: #ccc;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
}

.available-chat {
    padding: 0.75rem;
    background-color: #fff;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
}

.available-chat:hover {
    background-color: #eee;
}

.unread-badge {
    background-color: orange;
    color: white;
    padding: 2px 5px;
    border-radius: 5px;
    font-size: 12px;
    margin-left: auto;
}

.service-confirmation {
    display: flex;
    flex-wrap: wrap;
    max-width: 600px;
    align-items: center;
    gap: 0.5rem;
    padding: 0 10px;
    width: 50%;
}
.service-confirmation::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0.5px;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, #333 50%, transparent 100%);
}

@media screen and (max-width: 1250px) {
    .service-confirmation {
        width: 100%;
        max-width: 100%;
    }

    .service-confirmation::after {
        display: none;
    }
}

.services-to-confirm {
    display: flex;
    list-style-type: none;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1 1 auto; /*change*/
}

.services-to-confirm li {
    background-color: #e0e0e0;
    border-radius: 5px;
    padding: 6px 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    /* flex: 1 1 150px; */
    flex: 1 1 100px; /*change*/
    max-width: 150px; /*change*/
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.services-to-confirm li:hover {
    background-color: #c0c0c0;
}

.services-to-confirm li.selected {
    background-color: #4CAF50;
    color: white;
}

.services-to-confirm li.disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}

.service-confirmation input[type="checkbox"] {
    display: none;
}

.service-confirmation button {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 6px 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
    flex-shrink: 0;
    max-width: 200px;
    align-self: center;
    margin-left: auto;
}

.service-confirmation button:hover {
    background-color: #45a049;
}

.service-confirmation button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.pf-description {
    display: flex;
    align-items: center;
    width: 50%;
    padding: 0 10px;
}

/* Toggle button for chat selection */
.toggle-chat {
    display: none;
    background: #006ed4;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    cursor: pointer;
    text-align: center;
    margin-bottom: 1rem;
}

.toggle-chat:focus {
    outline: none;
}

/* Base styles for smaller screens */
@media (max-width: 768px) {
    .content {
        flex-direction: column; /* Stack content vertically */
        height: calc(100vh - 80px);
    }
    .chat-content {
        max-width: 100vw;
    }
    .choose-chat {
        min-width: 300px;
        max-width: 100vw;
        right: -100%;
        transition: 0.3s ease;
        position: fixed;
        z-index: 50;
    }
    .choose-chat.open {
        right: 0;
    }
    .available-chat {
        flex-wrap: wrap;
    }
    .message-input-cont {
        gap: 0.25rem;
    }
    #message-input {
        padding: 0.5rem;
    }
    .confirmation-btn {
        max-width: 100%;
    }
    .toggle-chat {
        display: block; /* Visible only on smaller screens */
    }

    #chat-overlay {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.4);
        z-index: 40;
    }
    #chat-overlay.active {
        display: block;
    }
}



.payment-info {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #ffffff, #f7f7f7);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    height: fit-content;
}

.highlighted {
    font-size: 1.3em;
    font-weight: bold;
    text-decoration: underline;
}

.fade-in {
    opacity: 1;
    /* animation: fadeIn 2s ease-in-out forwards; */
    margin-top: 1rem;
}

.fade-in p {
    display: grid;
    grid-template-columns: 1fr 4fr;
}

.accent {
    font-weight: bold;
    font-size: 1.2em;
    color: #3498db;
    transition: color 0.4s ease;
}

.accent:hover {
    color: #2ecc71;
}

.ref {
    /* font-weight: bold; */
    font-size: 1rem;
    /* color: #e74c3c; */
}

.thanks {
    margin-top: 1rem;
}

.save-changes {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    background-color: #007bff;
    border: 0.125px solid #007bff;
    border-radius: 1.5rem;
    color: #fff;
    gap: 0.5rem;
    outline: none;
    padding: 0.625rem 0.9375rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5rem;
    transition: 0.3s;
    cursor: pointer;
}

.save-changes:hover {
    background-color: #0056b3;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}


.billing-tab {
    padding: 20px;
    background: #fff;
    border-radius: 10px;
}



@media screen and (max-width: 900) {
    .message-box {
        max-width: 95%;
    }
}

@media screen and (min-width: 901px) and (max-width: 1024px) {
    .message-box {
        max-width: 85%;
    }
}

@media screen and (min-width: 1025) and (max-width: 1300) {
    .message-box {
        max-width: 75%;
    }
}

@media screen and (min-width: 1301) {
    .message-box {
        max-width: 65%;
    }
}



/* Responsive behavior for smaller screens */
@media screen and (max-width: 768px) {
    .half-width {
        flex-basis: 100%;
    }

    .row {
        flex-direction: column;
    }
}