/* Stylesheet used by the main.handlebars default view */
/* By default is applied to all HTML pages on the site */

/* ==================== Universal ==================== */
body {
    margin: 0 auto;
    font-family: Arial, sans-serif;
    background-color: #f8f8f8;
    color: #333;
    margin-bottom: 50px;
}

/* ==================== Navbar ==================== */
.navigation-bar {
    background-color: #6a5acd;
    color: white;
    width: 100%;
    line-height: 1.6;
}

/* Title icon: Can replace with a logo png or anything else */
.title-text {
    font-size: 24px;
    margin: 0;
}

/* flexible div containing header elements */
.bar {
    width: 90%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
}

/* nav bar elements */
nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}
nav li {
    margin-left: 35px;
}
nav a {
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
}
nav a:hover {
    text-decoration: underline;
    color: #d17b0f;
}

/* reformat navbar when screen gets squished */
@media (max-width: 732px) {
    .bar {
        flex-direction: column;
        align-items: center;
    }
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    nav li {
        margin: 10px 0;
    }
}

/* ==================== Page Title Bars ==================== */
/* for pages that use them (Dashboard + View Meeting) */
.title-bar {
    /* grid-area: __ ; */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #ffffff;
    border-bottom: 2px solid #d1d8e0;
}

.title-bar-short {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #ffffff;
    /* 
    CSS taken from https://www.w3schools.com/csS/css3_shadows_box.asp
    */
    box-shadow:
        0 2px 4px 0 rgba(0, 0, 0, 0.2),
        0 3px 5px 0 rgba(0, 0, 0, 0.19);
    border-radius: 8px;
}

.title-bar-multi {
    display: flex;
    width: 128.5%;
    padding: 1rem 2rem;
    background-color: #ffffff;
    border-bottom: 2px solid #d1d8e0;
    flex-direction: column;
    border-radius: 8px;
}

.page-title {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.title-bar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-direction: column;
}

.title-bar-actions button {
    font-size: 14px;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background-color: #6a5acd;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.title-bar-actions button:hover {
    background-color: #5a4abc;
}

.title-bar-actions label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #333;
}

/* reused checkbox styling in either title or side bars */
.sidebar-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

/* ==================== View meeting page ==================== */
.view-meetings-grid {
    display: grid;
    grid-template-columns: 3fr 1fr; /* 3/4 and 1/4 width */
    grid-template-rows: auto auto 300px;
    grid-template-areas:
        "title-bar title-bar"
        "calendar-section response-section"
        "comments-section notes-section";
    gap: 1rem;
    margin: 2rem;
}
.title-bar {
    overflow: hidden;
    grid-area: title-bar;
    background-color: #ffffff;
    padding: 1rem;
    border-bottom: 2px solid #d1d8e0;
    border-radius: 8px;
}
.calendar-section,
.notes-section,
.comments-section,
.response-section {
    border-radius: 8px;
    background-color: #ffffff;
    padding: 1rem;
    border: 1px solid #d1d8e0;
}

.calendar-section {
    grid-area: calendar-section;
    overflow-x: auto;
}
.notes-section {
    overflow: auto;
    grid-area: notes-section;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.comments-section {
    overflow: auto;
    height: 100%;
    grid-area: comments-section;
}

.response-section {
    grid-area: response-section;
}

/* ==================== Calendar UI Element ==================== */
.calendar {
    display: grid;
    grid-template-columns: 100px repeat(var(--day-count), minmax(100px, auto)); /* pass --day-count through a style tag in handlebars */
    grid-template-rows: auto;
    background-color: #ffffff;
    width: max-content;
    padding-right: 10px;
}

.calendar-center {
    display: grid;
    grid-template-columns: 100px repeat(var(--day-count), minmax(100px, auto)); /* pass --day-count through a style tag in handlebars */
    grid-template-rows: auto;
    background-color: #ffffff;
    width: max-content;
    margin: 0 auto;
}

/* contains calendar in one element */
.calendar-wrapper {
    width: 100%;
    padding-bottom: 0.5rem;
    padding-top: 20px;
}

/* header spans whole element */
#calendar-title-header {
    grid-column: 2 / -1; /* skip first row */
    grid-row: 1;
    background-color: #ffffff;
    text-align: center;
    font-weight: bold;
    font-size: large;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #d1d8e0;
}

/* Time column next to the calendar */
.time-column {
    grid-row: 2;
    grid-column: 1;
    display: flex;
    flex-direction: column;
}
.time-column-timestamp {
    text-align: right;
    vertical-align: bottom;
    font-size: 12px;
    height: 19px; /* height of timeslot cell plus 1 for border */
    margin-right: 10px;
}
.time-column-timestamp:first-child {
    /* specifically modify the first column timestamp to offset everything */
    padding-top: 36px;
}
.time-column-timestamp-small {
    /* make half-hour markers smaller */
    font-size: 9px;
}

/* Each Day gets a column on the grid */
.calendar-column {
    grid-row: 2;
    grid-column: auto;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #d1d8e0;
    border-bottom: 1px solid #d1d8e0;
}
/* put a right-side border on the last column */
.calendar-column:nth-last-of-type(1) {
    border-right: 1px solid #d1d8e0;
}

/*  Section of day column containing the day header */
.calendar-column-header {
    background-color: #f5f5f5;
    padding: 0.25rem;
    border-bottom: 1px solid #d1d8e0;
    height: 33px;
}
.calendar-column-header-text {
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    margin: 2%;
}

/* Section of day column containing the slots */
.calendar-cells {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* the actual cells of the columns */
.timeslot {
    height: 18px;
    overflow: hidden;
    border-bottom: 1px solid #ccc;
}
.response-slot {
    background-color: rgb(212, 237, 218, 0.75);
}
.selected {
    background-color: rgba(205, 90, 90, 0.8);
}

.notes-form {
    margin: 0;
    padding: 0;
    display: flex;
    width: 100%;
    height: 95%;
    align-items: stretch;
    gap: 4px;
    /*The scrollbar keep appearing no matter what I did so this is a quick fix -PV*/
}

.comments-form {
    margin: 0;
    padding: 0;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: stretch;
    gap: 4px;
}

/* Make it so that notes input takes up the entire div
It looks super weird without doing that... -PV
*/
#noteInput {
    flex: 1;
    height: 100%;
    font-family: Arial, sans-serif;
}

.text-input {
    flex: 1;
    height: 90%;
    font-family: Arial, sans-serif;
}

/*Hide label to make it still available for screen readers
But regular users will not see it
*/
.hidden-label {
    font-size: 0%;
}

/*
Paper Plane Send Icon
*/
.send-icon {
    width: 40px;
    height: 105%;
    background-color: #6a5acd;
    /*Send Icon Image from: svgrepo.com full credit to them!*/
    background-image: url("/public/icons/paper-airplane-svgrepo-com.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
    border-radius: 8px;
    border: none;
}

.send-icon:hover {
    background-color: #5a4abc;
    cursor: pointer;
}

.send-icon-comment {
    width: 40px;
    height: 100%;
    background-color: #6a5acd;
    /*Send Icon Image from: svgrepo.com full credit to them!*/
    background-image: url("/public/icons/paper-airplane-svgrepo-com.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
    border: none;
    border-radius: 8px;
}

.send-icon-comment:hover {
    background-color: #5a4abc;
    cursor: pointer;
}

/*Styling for AJAX-divs after response/success*/

#server-success {
    background-color: #d4edda;
    border-left: 8px solid #28a745;
    padding: 10px;
    font-family: Arial, sans-serif;
    color: #155724;
}

#noteSection #server-success,
#noteSection #server-fail {
    margin-top: 20px;
}

#server-fail {
    background-color: #f8d7da;
    border-left: 8px solid #dc3545;
    padding: 10px;
    font-family: Arial, sans-serif;
    color: #721c24;
}

/* Comment objects */
.comment {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 10px;
    background-color: #f0f0f0;
    position: relative;
    border: 1px solid #86909c;
}

.comment-wrapper {
    border-bottom: 1px solid #d1d8e0;
    padding: 10px 0;
    margin-bottom: 10px;
}
.comment-wrapper:last-child {
    border-bottom: none;
}

.trashIcon {
    height: 35px;
    width: 35px;
    margin-top: 10px;
    background-color: #c62232d0;
    /*Send Icon Image from: svgrepo.com full credit to them!*/
    background-image: url("/public/icons/trash-blank-svgrepo-com.svg");
    position: absolute;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
    top: 10px;
    right: 10px;
    border: none;
    border-radius: 8px;
}

.trashIcon:hover {
    cursor: pointer;
    background-color: rgba(197, 13, 31, 0.867);
}

/* 
Comments Form CSS
*/
.comments-form {
    margin: 0;
    padding: 0;
    display: flex;
    width: 100%;
    height: 100px;
    align-items: stretch;
    gap: 4px;
    overflow: hidden;
}

/* Styling for the prompt that asks if the user actually wants to delete a comment */
.deletePrompt {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 10px;
    background-color: #f0f0f0;
    position: relative;
    border: 1px solid #86909c;
    margin-right: 15px;
}
.yes-delete {
    margin-left: 10px;
    background-color: #28a745;
    padding: 10px;
    font-family: Arial, sans-serif;
    color: white;
    border-radius: 6px;
    border: 1px solid #86909c;
}
.no-delete {
    margin-left: 10px;
    background-color: #dc3545;
    padding: 10px;
    font-family: Arial, sans-serif;
    color: white;
    border-radius: 6px;
    border: 1px solid #86909c;
}

.yes-delete:hover {
    background-color: #00751b;
    cursor: pointer;
}

.no-delete:hover {
    background-color: #8c131f;
    cursor: pointer;
}

/* Styling for edit Meeting Response button*/

.response-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
}

.button-image {
    width: 20px;
    height: 20px;
}

.blocked-out-slot {
    background-color: rgb(0, 0, 0, 0.75);
}

.userResText,
.profileLink {
    display: block;
    margin-top: 4px;
    margin-bottom: 4px;
    padding: 6px;
    background-color: #6a5acd;
    color: #fff;
    text-decoration: none;
}

.userResText:hover,
.profileLink:hover {
    background-color: #5a4abc;
    cursor: pointer;
}

.errorInfo {
    color: red;
    font-weight: bold;
}

.back-button {
    font-size: 14px;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background-color: #6a5acd;
    color: white;
    font-weight: bold;
    cursor: pointer;
    align-items: center;
}

.back-button:hover {
    background-color: #5a4abc;
    cursor: pointer;
}

.edit-meeting-page {
    margin-left: 15px;
}

.usage-info-wrapper {
    display: none;
    background-color: #c1c6cb;
    border: 1px solid lightgrey;
    padding: 10px;
    padding-right: 20px;
    margin-top: 5px;
    border-radius: 5px;
    width: 300px;
    color: #494949;
    text-align: left;
}

.usage-notes-wrapper:hover .usage-info-wrapper {
    display: block;
}

.usage-header {
    font-weight: bold;
    color: #686767;
    display: flex;
    align-items: center;
}

#formWrapper,
#signupFormWrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #6a5acd;
    max-width: 500px;
    margin: auto;
}

.buttonWrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    margin: auto;
}

#editorForm,
#editMeeting,
#createMeeting,
#editorForm,
#signup,
#bookMeeting,
#login {
    width: 100%;
}

#editMeeting label,
#createMeeting label,
#editorForm label,
#bookMeeting label,
#signup label,
#login label {
    font-size: 16px;
    font-weight: bold;
    display: block;
    margin-top: 10px;
}

#editMeeting input[type="text"],
#editMeeting input[type="number"],
#createMeeting input[type="text"],
#createMeeting input[type="number"],
#editMeeting input[type="date"],
#createMeeting input[type="date"],
#login input[type="text"],
#signup input[type="text"],
#signup input[type="password"],
#editorForm input[type="text"],
#editorForm input[type="password"],
#bookMeeting input[type="date"],
#login input[type="password"] {
    width: 95%;
    padding: 8px;
    border: 1px solid #6a5acd;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 5px;
}

#createMeeting select,
#bookMeeting select {
    width: 98%;
    padding: 8px;
    border: 1px solid #6a5acd;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 5px;
}

#editMeeting input[type="date"]:hover,
#createMeeting input[type="date"]:hover,
#bookMeeting input[type="date"]:hover,
#createMeeting select {
    cursor: pointer;
}

.create-meeting-submit,
.edit-meeting-submit,
.pfp-upload,
.login-submit,
.signUp-submit {
    width: 93%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background-color: #6a5acd;
    margin-top: 15px;
    height: 25px;
}

p.edit-meeting-submit-text,
p.create-meeting-submit-text,
.login-submit-text,
.signUp-submit-text,
.pfp-upload-text {
    font-size: 14px;
    color: white;
    font-weight: bold;
}

.create-meeting-submit:hover,
.edit-meeting-submit:hover,
.login-submit:hover,
.signUp-submit:hover,
.pfp-upload:hover {
    background-color: #5a4abc;
    cursor: pointer;
}

.myMeetingLink,
.signUpLink,
.createMeetingLink {
    display: flex;
    margin-top: 4px;
    margin-bottom: 4px;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background-color: #6a5acd;
    color: #fff;
    width: 150px;
    border-radius: 6px;
    text-decoration: none;
    gap: 8px;
}

.linkShareButton,
.editBookMeeting {
    display: flex;
    margin-top: 4px;
    margin-bottom: 4px;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background-color: #6a5acd;
    color: #fff;
    width: 200px;
    border-radius: 6px;
    text-decoration: none;
    gap: 8px;
}

.cancelMeetingButton,
.editProfileButton,
.restoreMeetingButton {
    display: flex;
    margin-top: 4px;
    margin-bottom: 4px;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background-color: #6a5acd;
    color: #fff;
    width: 170px;
    border-radius: 6px;
    gap: 8px;
    outline: none;
    border: none;
    font-size: 15px;
}

.editProfileButton {
    display: flex;
    margin-top: 4px;
    margin-bottom: 4px;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background-color: #6a5acd;
    color: #fff;
    border-radius: 6px;
    gap: 8px;
    outline: none;
    border: none;
    font-size: 15px;
    padding-right: 30px;
}

.linkWrapper {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.linkWrapperCenter {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
    align-items: center;
}

.restoreMeetingButton:hover,
.editProfileButton:hover,
.cancelMeetingButton:hover,
.editBookMeeting:hover,
.linkShareButton:hover,
.createMeetingLink:hover,
.myMeetingLink:hover,
.signUpLink:hover {
    background-color: #5a4abc;
    cursor: pointer;
}

.usage-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.pfp-succ {
    color: white;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.pfp-fail {
    color: white;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.center-calendar-wrapper {
    display: flex;
    justify-content: center;
    flex-direction: column;
    width: 100%;
}
.calendar-wrapper-center {
    justify-content: center;
    width: 100%;
    padding-bottom: 0.5rem;
    padding-top: 20px;
}

.best-time-tooshort {
    color: #999;
    font-style: italic;
    display: none;
}

.infoHeader {
    display: flex;
    justify-content: center;
    width: max-content;
    max-width: 60%;
    padding: 20px;
    background: #b1a7f0;
    border-radius: 10px;
    margin-right: 20px;
    justify-content: space-between;
}

.infoHeader img {
    flex: 1;
    max-width: 250px;
    border-radius: 6px;
}

.pfpSeparator {
    margin-left: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.profileName {
    font-size: 30px;
    margin-bottom: 0px;
}

.profileID {
    font-size: 12px;
    margin-left: 1px;
}

.profileDescription {
    color: #494949;
    font-size: 16px;
}

.genButton {
    width: 93%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background-color: #6a5acd;
    margin-top: 15px;
    height: 25px;
    width: 200px;
    height: 40px;
}

.genButton-text {
    font-size: 14px;
    color: white;
    font-weight: bold;
}

.genButton:hover {
    background-color: #5a4abc;
    cursor: pointer;
}

.center-gen {
    display: flex;
    justify-content: center;
    align-items: center;
}
