/* Import Fonts */
:root {
    --font-heading: 'Jost', sans-serif;
    --font-body: 'Lato', sans-serif;

    --primary-blue: #1A3C6E;  /* Dark Blue */
    --accent-gold: #D9B365;   /* Gold */
}

/* General Styles */
body {
    font-family: var(--font-body);
    background-color: #fafafa;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Headings (Jost) */
h1, h2, h3, .dark-title, .conversation-header h2 {
    font-family: var(--font-heading);
}

/* Small Text (Lato) */
p, ul li, .message-header p, .message-body p {
    font-family: var(--font-body);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--primary-blue);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000; /* Ensures it stays above other elements */
    font-family: var(--font-heading);
}
.header h1 {
    color: white
}
.header .conversation-button:hover{
    background-color: white;
    color: var(--primary-blue);
}

#user-info {
    font-size: 1.1em;
    font-weight: bold;
}

.auth-buttons button {
    padding: 8px 12px;
    margin-left: 10px;
    cursor: pointer;
    background-color: #fff;
    border: 1px solid var(--accent-gold);
    border-radius: 4px;
    color: var(--primary-blue);
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.auth-buttons button:hover {
    background-color: var(--accent-gold);
    color: white;
}

/* Inbox Container */
.inbox-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    align-items: flex-start;
    padding-bottom: 60px;
    padding-top: 75px;
}

/* Ticket List */
.ticket-list {
    width: 60%;
    border-collapse: collapse;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: white;
    border-radius: 4px;
    overflow: hidden;
    animation: fadeIn 0.5s ease;
}

.ticket-list th, .ticket-list td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.ticket-list th {
    background-color: var(--primary-blue);
    color: white;
    font-weight: bold;
}

.ticket-row:hover {
    background-color: var(--primary-blue);
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Ticket Sidebar */
.ticket-sidebar {
    width: 35%;
    padding: 20px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow-y: auto;
    max-height: 90vh;
    padding-bottom: 60px;
    border-left: 4px solid var(--accent-gold);
    animation: slideIn 0.5s ease;
    position: sticky;
    top: 75px; /* Adjust based on header height */
    z-index: 900; /* Ensure it doesn't overlap the header */
}

.ticket-sidebar h2 {
    margin-top: 0;
    font-size: 1.2em;
    color: var(--primary-blue);
}

.ticket-sidebar p {
    margin-bottom: 15px;
}

/* Links */
a {
    display: inline-block;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

/* Collapsible Account Header */
.collapsible.account-header {
    background-color: var(--primary-blue);
    color: white;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    font-size: 16px;
    border-radius: 4px;
    margin-bottom: 10px;
    transition: background-color 0.3s ease;
}

.collapsible.account-header:hover {
    background-color: var(--accent-gold);
    color: white;
}

.collapsible.account-header.active {
    background-color: var(--accent-gold);
    color: white;
}
/* Compact rows */
.conversation-row {
    font-weight: bold;
    background-color: #f0f0f0;
}

.email-row {
    font-size: 0.9em;
    background-color: #ffffff;
    cursor: pointer;
}

/* Hover effect for rows */
.conversation-row:hover, .email-row:hover {
    background-color: #e0e0e0;
}


/* Collapsible Content */
.content {
    display: none;
    margin-top: 5px;
    border-radius: 4px;
    background-color: #f9f9f9;
    animation: fadeInContent 0.3s ease;
}


/* Spinner Styles */
#spinner {
    display: none;
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top: 4px solid var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Collapsible Styles */
.collapsible {
    background-color: #f1f1f1;
    color: #444;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    transition: background-color 0.3s ease;
}

.collapsible:hover {
    background-color: #e1e1e1;
}

.collapsible.active {
    background-color: var(--primary-blue);
    color: white;
}


/* Heading */
h1 {
    padding: 20px;
    font-size: 1.8em;
    color: var(--primary-blue);
    text-align: center;
    position: relative;
    text-transform: uppercase;
}

h1::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-gold);
    margin: 8px auto 0;
}



/* Hover for Ticket Table Rows */
#ticketTableBody tr:hover {
    background-color: var(--primary-blue);
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.details-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--accent-gold);
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
}

.details-button:hover {
    background-color: #0056b3;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInContent {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* Pagination Styles */
/* Make pagination stick to the bottom */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    gap: 10px;
    background-color: white;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    border-top: 2px solid var(--accent-gold);
    z-index: 1000; /* Ensure it stays above other elements */
}

.pagination-btn {
    padding: 8px 15px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pagination-btn:hover {
    background-color: var(--accent-gold);
    color: white;
}

.pagination-btn:disabled {
    background-color: #ddd;
    color: #999;
    cursor: not-allowed;
}

.page-info {
    font-size: 1em;
    color: var(--primary-blue);
    font-weight: bold;
}

.conversation-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent-gold);
    color: white;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    border-radius: 5px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.conversation-button:hover {
    background-color: var(--primary-blue);
    color: white;
}

.conversation-button:active {
    background-color: #0056b3;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}
/* Conversation Container */
.conversation-container {
    padding: 20px;
    width: 1000px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

/* Conversation Header */
.conversation-header h2 {
    font-size: 1.5em;
    color: var(--primary-blue);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 10px;
    text-transform: uppercase;
}

/* Messages List */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Individual Message Card */
.message-card {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.message-card:hover {
    background-color: #f0f0f0;
}

/* Message Header */
.message-header p {
    margin: 5px 0;
    font-size: 1em;
    color: var(--primary-blue);
}

.message-header p strong {
    color: var(--accent-gold);
}

/* Message Body */
.message-body {
    margin-top: 15px;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.message-body h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: var(--primary-blue);
}

.message-body p {
    font-size: 1em;
    line-height: 1.5;
    color: #333;
}
.dark-title{
    color: white !important;
}

.message-body div {
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    overflow: auto;
    line-height: 1.5;
    white-space: pre-wrap; /* Ensures line breaks in plain text are rendered */
}
/* General Container Styling */
.container {
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Card Styling */
.card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.card:hover {
    background-color: #f0f0f0;
}

/* Key-Value Styling */
.key-value {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 1em;
    color: #333;
}

.key-value .key {
    font-weight: bold;
    color: var(--primary-blue);
    width: 150px;
    text-align: left;
}

.key-value span {
    text-align: left;
    color: #555;
}

/* Section Heading Styling */
.entity-section h2, .lines-section h2, .actions-section h2 {
    font-family: var(--font-heading);
    font-size: 1.8em;
    color: var(--primary-blue);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 5px;
}

/* Back Button */
.conversation-button {
    display: inline-block;
    padding: 10px 15px;
    background-color: var(--accent-gold);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.conversation-button:hover {
    background-color: var(--primary-blue);
}

/* Sales Lines Table */
.sales-lines-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sales-lines-table th,
.sales-lines-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

.sales-lines-table th {
    background-color: var(--primary-blue);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

.sales-lines-table td {
    background-color: #f9f9f9;
    color: #333;
}

.sales-lines-table tr:nth-child(even) td {
    background-color: #f4f4f4;
}


/* Notes and Price Rows */
.sales-lines-table tr td[colspan] {
    background-color: #fff;
    font-size: 0.95em;
}

/* Align Total Column */
.sales-lines-table td:last-child {
    font-weight: bold;
}

/* Rowspan Styling */
.sales-lines-table td[rowspan="3"] {
    vertical-align: middle;
    text-align: left;
}
.notes {
    font-size: 0.95em;
    line-height: 1.5;
    color: #333;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.notes ul {
    list-style-type: disc;
    margin: 0;
    padding-left: 20px;
}

.notes ul ul {
    list-style-type: circle;
    padding-left: 20px;
}

.notes ul ul ul {
    list-style-type: square;
    padding-left: 20px;
}

.notes li {
    margin-bottom: 8px;
}

.notes li strong {
    font-weight: bold;
    color: var(--primary-blue);
}
/* Hide notes by default */
.sales-lines-table .collapsible-row {
    display: none; /* Ensure it's hidden by default */
    transition: all 0.3s ease; /* Smooth transition */
}

/* Make clickable rows interactive */
.sales-lines-table .clickable-row {
    cursor: pointer;
}

.sales-lines-table .clickable-row:hover {
    background-color: #f1f1f1; /* Light gray background on hover */
    transition: background-color 0.3s ease;
}

/* Optional: Highlight active rows */
.sales-lines-table .clickable-row.active {
    background-color: var(--accent-gold); /* Highlighted color */
    color: white; /* Optional: Change text color */
}

/* Notes row style (expanded view) */
.sales-lines-table .collapsible-row.active {
    display: table-row; /* Show row when active */
}

.sales-lines-table tfoot {
    font-weight: bold;
    background-color: #f9f9f9;
    border-top: 2px solid #ddd;
}

.sales-lines-table tfoot td {
    padding: 12px 15px;
    text-align: right;
}
.response-form {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.response-form h3 {
    margin-bottom: 10px;
    font-weight: bold;
}

.response-form textarea {
    width: 90%;
    padding: 10px;
    font-size: 1rem;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: vertical;
}

.response-form .submit-button {
    background-color: #4caf50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.response-form .submit-button:hover {
    background-color: #45a049;
}
/* Info Card Styling */
.info-card {
    display: flex;
    flex-direction: column;
    background-color: white;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.info-card:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transform: scale(1.01);
}

.info-table {
    display: flex;
    flex-direction: column;
    background-color: white;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    margin-top: 20px;
}

/* Grid for Data */
.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Two columns */
    gap: 8px; /* Space between grid items */
    font-size: 0.9em;
    line-height: 1.4;
}

.info-grid div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-grid strong {
    color: var(--primary-blue);
    font-weight: bold;
}

.info-grid div span {
    color: #555;
    text-align: right;
}

/* Action Section */
.info-action {
    text-align: center;
    margin-top: 10px;
}

/* Login Page Container */
.login-container {
    max-width: 600px;
    margin: 50px auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
}

/* Login Header */
.login-container h1 {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.login-container h2 {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.login-container .error-message {
    color: red;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-form label {
    text-align: left;
    width: 100%;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--primary-blue);
}

.login-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding and border in width */
}

.login-form button {
    width: 100%;
    font-family: var(--font-heading);
}


.ticket-page-container {
    display: flex;
    width: 80%;
    margin: auto;
}

/* Styling for the conversation-sidebar */
.conversation-sidebar {
    padding: 20px;
    width: 400px;
    margin-left: 30px;
    background-color: #fff;
    color: black; /* Text color */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Slightly darker shadow */
    border-radius: 8px; /* Rounded corners */
    display: flex;
    flex-direction: column; /* Stack content vertically */
    gap: 20px; /* Add spacing between elements */
}

/* Headings in the sidebar */
.conversation-sidebar h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-gold); /* Accent underline */
    padding-bottom: 5px;
    color: var(--primary-blue); /* Blue text */
    text-transform: uppercase;
}

/* Text in the sidebar */
.conversation-sidebar p {
    font-size: 1em;
    line-height: 1.6;
}

/* Forms in the sidebar */
.conversation-sidebar form {
    background-color: var(--primary-blue); /* Light background for forms */
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Light shadow */
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
    margin-bottom: 25px;
}

/* Labels in forms */
.conversation-sidebar label {
    font-weight: bold;
    color: #fff; /* Blue text */
}

/* Select inputs */
.conversation-sidebar select {
    padding: 10px;
    font-size: 1em;
    border: 1px solid var(--primary-blue); /* Blue border */
    border-radius: 4px;
    background-color: #f9f9f9;
    color: #333;
}

/* Buttons in the sidebar */
.conversation-sidebar .update-button {
    background-color: var(--accent-gold);
    color: white;
    padding: 10px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
}

.conversation-sidebar .update-button:hover {
    background-color: var(--primary-blue); /* Blue on hover */
    color: white;
}


.conversation-sidebar input[type="text"] {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--primary-blue);
    border-radius: 4px;
    background-color: white;
}

.conversation-sidebar button {
    background-color: var(--primary-blue);
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.conversation-sidebar button:hover {
    background-color: var(--accent-gold);
    color: white;
}

.conversation-sidebar .status-update h3 {
    text-transform: uppercase;
    border-bottom: 2px solid var(--accent-gold);
    color: var(--primary-blue);
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px 40px; /* More spacious padding */
    border: none; /* Remove default border */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 6px 6px rgba(0, 0, 0, 0.1); /* Elegant shadow */
    z-index: 1000;
    width: 500px; /* Increased width */
    max-width: 90%; /* Maintain responsiveness */
    border-radius: 12px; /* Smooth rounded corners */
    text-align: left; /* Align content to the left */
    animation: modalFadeIn 0.4s ease; /* Add fade-in animation */
}



/* Modal Inputs */
.modal input {
    width: 90%; /* Full width for better UX */
    padding: 10px 15px;
    font-size: 1em;
    margin-top: 10px;
    border-radius: 6px; /* Rounded input fields */
    border: 1px solid #ddd;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); /* Subtle inset shadow */
}
.modal select, 
.modal button {
    width: 97%;
    padding: 10px 15px;
    font-size: 1em;
    margin-top: 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    cursor: pointer;
}

/* Style Buttons */
.modal button {
    background-color: var(--primary-blue);
    color: white;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal button:hover {
    background-color: var(--accent-gold);
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-blue);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--accent-gold);
}

/* Modal Header */
.modal h2 {
    font-family: var(--font-heading);
    font-size: 1.8em;
    margin-bottom: 20px;
    color: var(--primary-blue);
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 10px;
}

/* Modal Animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

