:root {
    --dark-blue: #2e3f6e; 
    --accent-blue: #4db7fe; 
    --faded-blue: #c3cbe6;
}
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
}
body{
    padding-top: 60px;
}
.button{
    background-color: var(--accent-blue);
    color:white;
    padding: 10px;
    text-align: center;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
}
.button:hover{
    background-color: var(--dark-blue);
}
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    height: 60px;
    background-color: var(--dark-blue);
    color: white;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}
.navbar h1{
    color:white;
    margin:0;
    line-height: 80px;
}
.navbar h1 a{
    text-decoration: none;
    color:inherit;
}
.navbar h1 a span{
    color: var(--accent-blue);
}
/*.content {
    display: flex;
    margin-top: 60px; 
    height: calc(100vh - 60px);
}*/
.navbar ul{
    list-style-type:none;
    display:flex;
    padding: 0;
    line-height: 60px;
    margin: 0;
    color:white;
}
.navbar ul li a{
    color:inherit;
    text-decoration: none;
}
.chat-interface {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: calc(100vh - 120px);
    /* Camp-themed background */
    background-image: url('../images/campbg.png');
    background-repeat: repeat;
    background-attachment: local;
    position: relative;
    background-size: 260px;
}
.chat-interface.scrolled {
    height: 0 !important; /* Shrink chat interface when scrolled */
}
.conversation {
    position: relative;
    overflow-y: auto;
    padding: 50px 30px 30px 30px; 
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* Each message */
.message {
    display: flex;
    align-items: flex-end;
    gap: 18px;
}

/* Left message */
.message.left {
    justify-content: flex-start;
}

/* Right message */
.message.right {
    justify-content: flex-end;
}

/* Avatar styling */
.avatar{
    height:40px;
    width: 40px;
    text-align:center;
    line-height: 40px;

    background: var(--dark-blue);
    color:white;
    font-weight: bold;
    font-style: normal;
    font-size: 20px;
    border-radius: 50%;
    overflow:hidden;
}
.right .avatar{
    background: var(--accent-blue);
}
/*#chat p.user{
    background: white;
    border-color:gray;
    float:right;
    margin-left:0;
    margin-right: 60px;
}*/
/*.avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
*/
/* Bubble styling */
.bubble {
    max-width: 45%;
    padding: 10px;
    background-color: #f1f1f1;
    border-radius: 10px;
    font-size: 16px;
    line-height: 20px;
    word-wrap: break-word;
    position: relative;
    /* Ensure readability over background */
    backdrop-filter: blur(1px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.bubble p{
    margin:0;
}
.message.left .bubble{
    background:var(--faded-blue);
    /* Enhanced contrast for left messages */
    backdrop-filter: blur(1px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.message.left .bubble.typing{
    background:#c1c1c1;
    color:white;
}
/* Tail for the speech bubble */
.bubble::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #f1f1f1; /* Same color as the bubble */
    bottom: 10px;
}
.message.left .bubble::after{
    border-top:10px solid var(--faded-blue);
}
.message.left .bubble.typing::after{
    border-top:10px solid #c1c1c1;
}
.message.left .bubble::after {
    left: -10px;
    transform: translateY(-50%);
}

.message.right .bubble::after {
    right: -10px;
    transform: translateY(-50%);
}
.text-entry {
    display: grid;
    grid-template-columns: 1fr 70px;
    background-color: var(--dark-blue);
    min-height: 30px;
}

.text-entry input {
    padding: 10px;
}

.text-entry button {
    padding: 21px;
    margin: 20px 0;
    background: var(--accent-blue);
    border: 1px solid var(--accent-blue);
    border-radius: 12px;
    font-size: 22px;
    color: white;
    cursor: pointer;
}
#response{
    margin:20px;
    padding:20px;
    background:white;
    border:1px solid white;
    border-radius: 12px;
    min-height:30px;
    line-height: 24px;
    font-size: 16px;
}
#response select,
#response input{
    background: none;
    border: none;
    border-bottom: 2px dashed var(--accent-blue);
    border-radius: 0;
    padding: 2px 4px;
    line-height: 20px;
    font-size: 16px;
    font-weight: bold;
    color: var(--dark-blue);
    transition: border-color 0.3s ease;
    margin: 0 2px;
    width: auto;
    display: inline;
}
#response select {
    width: fit-content;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234db7fe' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 16px;
    padding-right: 24px;
}
#response select:focus,
#response input:focus{
    outline: none;
    border-bottom-color: var(--dark-blue);
}
#response select:hover,
#response input:hover{
    border-bottom-color: var(--dark-blue);
}
/* Job Listings Section */
.job-listings {
    display: flex;
    position: relative;
    min-height: 100vh;
    background: #eee;
}

.job-sidebar {
    background-color: #eee;
    padding: 20px;
    width: 300px;
    height: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 100;
}

.job-sidebar select,
.job-sidebar input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--dark-blue);
    transition: all 0.3s ease;
    margin-top: 6px;
}
.job-sidebar select:focus,
.job-sidebar input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background-color: rgba(75, 183, 254, 0.05);
    box-shadow: 0 0 0 3px rgba(75, 183, 254, 0.15);
}
.job-sidebar select:hover,
.job-sidebar input:hover {
    border-color: var(--faded-blue);
    background-color: #f8f9fa;
}
.job-sidebar label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 4px;
    display: block;
}

.job-main {
    background-color: #f9f9f9;
    padding: 20px;
    flex: 1;
    min-height: 100vh;
}

.filters-button {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--dark-blue);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 16px;
    cursor: pointer;
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.filters-button:hover {
    background-color: var(--accent-blue);
}

.filters-button.visible {
    transform: translateY(0);
}

.job-listings ul,
.job-sidebar ul{
    padding: 0;
    list-style-type: none;
}
.job-sidebar li{
    margin-bottom: 16px;
}
.job-sidebar h2 {
    color: var(--dark-blue);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    margin-top: 0;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--accent-blue);
}
.job-sidebar h3 {
    color: var(--dark-blue);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    margin-top: 32px;
    padding: 12px 0 8px 0;
    border-bottom: 2px solid var(--faded-blue);
    position: relative;
}
.job-sidebar h3:first-of-type {
    margin-top: 24px;
}
.job-sidebar h3::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 20%;
    height: 2px;
    background: var(--accent-blue);
    transition: all 0.3s ease;
}

/* Progressive positioning and sizing for each section */
.job-sidebar h3:nth-of-type(1)::before {
    left: 0;
    width: 20%; /* First section covers 0-20% */
}

.job-sidebar h3:nth-of-type(2)::before {
    left: 20%;
    width: 20%; /* Second section covers 20-40% */
}

.job-sidebar h3:nth-of-type(3)::before {
    left: 40%;
    width: 60%; /* Third section covers 40-100% */
}

.job-sidebar h3:nth-of-type(4)::before {
    left: 40%;
    width: 60%; /* Fourth section also covers 40-100% */
}

.job-sidebar h3:nth-of-type(5)::before {
    left: 40%;
    width: 60%; /* Fifth+ sections also cover 40-100% */
}

.filters li{
    display: inline-block;
    font-size: 12px;
    background-color: var(--faded-blue);
    color:black;
    margin:0 8px 8px 0;
    padding: 4px 8px;
    border-radius: 8px;
    position: relative;
}
.filters li .remove-filter {
    cursor: pointer;
    margin-left: 8px;
    font-size: 18px;
    font-weight: bold;
    color: var(--dark-blue);
    display: inline-block;
    line-height: 1;
    padding: 0 2px;
    transition: color 0.2s ease;
}
.filters li .remove-filter:hover {
    color: #d91f1f;
}
.filters #clear_filters{
    color:white;
    background:var(--accent-blue);
}
.filters #clear_filters:hover{
    background:var(--dark-blue);
}
.job-sidebar .button-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 20px;
    padding: 0;/* 20px;*/
    gap: 10px;
}

.apply-button {
    background-color: var(--accent-blue);
    color: white;
    padding: 10px 20px;
    text-align: center;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    width: fit-content;
    text-decoration: none;
}

.cancel-button {
    color: #666;
    padding: 10px 20px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
}

.cancel-button:hover {
    color: #333;
}

/* Mobile Layout */
@media (max-width: 768px) {
    .content {
        height: 100%; /* Full viewport height for mobile */
    }

    .chat-interface {
        height: calc(100vh - 120px);
    }
    
    /* Mobile form input improvements */
    #resp_wrap{
        overflow: hidden;
    }
    #response {
        margin: 15px;
        padding: 16px;
    }
    
    #response select,
    #response input {
        padding: 6px 0;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    #response select{
        padding-right: 24px;
    }
    .job-sidebar select,
    .job-sidebar input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .text-entry button {
        padding: 17px;
        margin: 16px 0;
        /*font-size: 15px;*/
    }

    .job-listings {
        display: block;
    }

    .job-sidebar {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100% - 60px);
        background-color: #eee;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
        z-index: 900;
    }

    .job-sidebar.show {
        transform: translateX(0);
    }

    .job-sidebar.show ~ .filters-button {
        display: none;
    }

    .job-sidebar select {
        width: 100%;
        max-width: 100%;
    }

    .job-sidebar .button-container {
        /*position: relative;
        bottom: -20px;
        left: -20px;
        right: -20px;*/
        background: white;
        padding: 15px 20px;
        box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
        margin-top: 0;
    }

    .job-sidebar .cancel-button {
        display: block;
    }

    .job-main {
        padding-bottom: 60px;
        margin-top: 60px;
    }

    .filters-button {
        display: block;
    }

    .apply-button {
        margin-left: auto;
        margin-right: 20px;
    }

    .cancel-button {
        margin-left: 20px;
    }
}

@media (min-width: 769px) {
    .job-sidebar .button-container {
        display: flex;
    }

    .job-sidebar .cancel-button {
        display: none;
    }
}

/* Animations */
.chat-bubble {
  background-color:var(--faded-blue);
  padding:16px 28px;
  -webkit-border-radius: 20px;
  -webkit-border-bottom-left-radius: 2px;
  -moz-border-radius: 20px;
  -moz-border-radius-bottomleft: 2px;
  border-radius: 20px;
  border-bottom-left-radius: 2px;
  display:inline-block;
}
.typing {
  align-items: center;
  display: flex;
  height: 17px;
}
.typing .dot {
  animation: mercuryTypingAnimation 1.8s infinite ease-in-out;
  background-color: var(--dark-blue);
  border-radius: 50%;
  height: 7px;
  margin-right: 4px;
  vertical-align: middle;
  width: 7px;
  display: inline-block;
}
.typing .dot:nth-child(1) {
  animation-delay: 200ms;
}
.typing .dot:nth-child(2) {
  animation-delay: 300ms;
}
.typing .dot:nth-child(3) {
  animation-delay: 400ms;
}
.typing .dot:last-child {
  margin-right: 0;
}

@keyframes mercuryTypingAnimation {
  0% {
    transform: translateY(0px);
    background-color:#6CAD96;
  }
  28% {
    transform: translateY(-7px);
    background-color:var(--accent-blue);
  }
  44% {
    transform: translateY(0px);
    background-color: #B5D9CB;
  }
}

#listing {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 1200px) {
    #listing {
        grid-template-columns: repeat(2, 1fr);
    }
}

.listing-item {
    display: grid;
    grid-template-columns: 1fr minmax(min-content, 200px);
    background: white;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.listing-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.listing-item .main-content {
    padding: 20px;
}

.listing-item .details h3 {
    margin: 0 0 10px 0;
    color: var(--dark-blue);
    font-size: 1.2em;
}

.listing-item .details p {
    margin: 5px 0;
    color: #666;
    font-size: 0.9em;
}

.listing-item .right-section {
    display: grid;
    grid-template-rows: 1fr auto;
    background: #f8f9fa;
}

.listing-item .session-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.listing-item .session-info p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

.listing-item .session-info strong {
    color: var(--dark-blue);
    margin-bottom: 5px;
}

.listing-item .action-section {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.listing-item .button {
    display: inline-block;
    background-color: var(--accent-blue);
    color: white;
    padding: 8px 16px;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
}

.listing-item .button:hover {
    background-color: var(--dark-blue);
}

@media (max-width: 768px) {
    .listing-item {
        grid-template-columns: 1fr minmax(min-content, 170px);
    }

    .listing-item .main-content {
        padding: 15px;
    }

    .listing-item .right-section {
        background: none;
        grid-template-rows: 1fr auto;
        border-left: 1px solid #eee;
    }

    .listing-item .session-info {
        padding: 15px;
        border-top: none;
    }

    .listing-item .action-section {
        padding: 15px;
    }

    .listing-item .button {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px;
    }
}

/* Login Modal - Site-wide styling */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(46, 63, 110, 0.8);
    backdrop-filter: blur(4px);
}

.login-box {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(46, 63, 110, 0.3);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

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

.login-header {
    background: var(--dark-blue);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white !important;
}

.login-header .close_box {
    color: white;
    text-decoration: none;
    font-size: 24px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.login-header .close_box:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-blue);
}

.login-content {
    padding: 2rem;
}

.login-content .login,
.login-content .reset {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-content label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--dark-blue);
    font-size: 14px;
}

.login-content input {
    padding: 12px 16px;
    border: 2px solid var(--faded-blue);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    line-height: normal;
    text-indent: 0;
    margin: 0;
}

.login-content input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: white;
    box-shadow: 0 0 0 3px rgba(75, 183, 254, 0.15);
}

.login-content input:hover {
    border-color: var(--accent-blue);
    background: white;
}

.login-content input::placeholder {
    color: #999;
    font-weight: normal;
}

.login-content .button {
    background: var(--accent-blue);
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
}

.login-content .button:hover {
    background: var(--dark-blue);
    box-shadow: 0 4px 12px rgba(46, 63, 110, 0.3);
}

.login-footer {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--faded-blue);
    text-align: center;
}

.login-footer a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    color: var(--dark-blue);
    text-decoration: underline;
}

/* Mobile responsiveness for login modal */
@media (max-width: 768px) {
    .login-modal {
        padding: 10px;
    }
    
    .login-box {
        max-width: 100%;
    }
    
    .login-header {
        padding: 1rem 1.5rem;
    }
    
    .login-header h3 {
        font-size: 16px;
    }
    
    .login-content {
        padding: 1.5rem;
    }
    
    .login-content input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .login-content .button {
        max-width: 100%;
        justify-content: center;
    }
}

/* Custom Scrollbars - Site-wide styling */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(195, 203, 230, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--faded-blue);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

::-webkit-scrollbar-thumb:active {
    background: var(--dark-blue);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--faded-blue) rgba(195, 203, 230, 0.2);
}

/* Conversation specific scrollbar styling */
.conversation::-webkit-scrollbar {
    width: 6px;
}

.conversation::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.conversation::-webkit-scrollbar-thumb {
    background: rgba(75, 183, 254, 0.3);
    border-radius: 3px;
}

.conversation::-webkit-scrollbar-thumb:hover {
    background: rgba(75, 183, 254, 0.5);
}

/* Job sidebar scrollbar */
.job-sidebar::-webkit-scrollbar {
    width: 6px;
}

.job-sidebar::-webkit-scrollbar-track {
    background: rgba(195, 203, 230, 0.1);
    border-radius: 3px;
}

.job-sidebar::-webkit-scrollbar-thumb {
    background: var(--faded-blue);
    border-radius: 3px;
}

.job-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}
    
    /* Form error states - sitewide */
    input.error,
    textarea.error,
    select.error {
        border-color: #e74c3c !important;
        background: rgba(231, 76, 60, 0.05) !important;
    }
    input.error:focus,
    textarea.error:focus,
    select.error:focus {
    border-color: #e74c3c !important;  
        box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15) !important;
    }