/* Global Styles */
:root {
    --primary-color: rgb(192, 38, 211);
    --primary-gradient: linear-gradient(to right, rgb(219, 39, 119), rgb(192, 38, 211));
    /* --secondary-color: #6c757d; */
    --secondary-color: #5f666c;
    --success-color: #21ba45;
    --background-color: #f7f7f7;
    --border-color: #e9ecef;
    --text-color: #343a40;
    --sidebar-width: 280px;
    --sidebar-background: #f8f6fa;
    --analytics-width: 33%;
    --header-height: 60px;
    --chat-bubble-ai: #fff;
    --chat-bubble-user: color(srgb 0.977 0.931 0.98);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

/* App Layout */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    background-color: var(--sidebar-background);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    font-size: 14px;
    font-weight: 600;
    /* color: #834add; */
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 0 0 16px 0;
    border-bottom: 0;
}

.telco-title {
    color: rgb(192, 38, 211);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.new-project-btn-container {
    padding: 16px 0;
}

.new-project-btn {
    width: 100%;
    padding: 10px;
    background-color: rgb(192, 38, 211);
    background-image: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-project-btn:hover {
    opacity: 0.9;
}

.sidebar-section {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 12px;
}

.export-all {
    font-size: 0.75rem;
    color: rgb(192, 38, 211);
    cursor: pointer;
}

.project-item {
    padding: 10px 10px;
    border-radius: 5px;
    margin-bottom: 8px;
    cursor: pointer;
    color: rgb(75, 75, 75);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.project-item:hover, .active-project {
    background-color: #fcddfe;
    color: #c026d3;
    border-left: 0;
}

.project-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.active-project .project-name {
    color: rgb(192, 38, 211) !important;
}

.project-savings {
    font-size: 0.85rem;
    color: rgb(99, 101, 105);
    font-weight: 600;
    font-size: 0.9rem;
}

.project-savings i {
    margin: 0rem 0.5rem 0rem -1rem;
}   

.chat-item {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 8px;
    background-color: transparent;
    cursor: pointer;
}

.chats {
    /* background-color: #f9edfa; */
    display: inline-flex;
}

.current-chat {
    /* background-color: #f9edfa; */
    display: inline-flex;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.chat-title {
    font-weight: 600;
}

.chat-time {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.chat-description {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.chat-status {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 8px;
}

.active {
    background-color: #fcddfe;
    /* color: rgb(192, 38, 211); */
    color: rgba(0,0,0,.87);
    /* #147a14; */
}

.completed {
    background-color: #e0f5e0;
    color: #147a14;
}

.chat-findings {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--secondary-color);
}

.knowledge-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 0.9rem;
    color: rgb(75, 75, 75);
    cursor: pointer;
}

.knowledge-item:hover {
    color: rgb(192, 38, 211);
}

.knowledge-item i {
    margin-right: 8px;
    color: var(--secondary-color);
}

/* Main Content Styles */
.main-content {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 20px;
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: hidden;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 0 10px 0;
    z-index: 10;
    background-color: var(--background-color);
    flex-wrap: wrap;
    gap: 10px;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.copyright {
    font-size: 0.8em;
    color: var(--secondary-color);
    font-weight: 500;
}

.project-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.analytics-btn {
    background-color: #fff;
    color: rgb(192, 38, 211);
    border: 1px solid rgb(192, 38, 211);
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 20;
    position: relative;
}

.analytics-btn:hover {
    background-color: rgb(253, 244, 255);
}

.project-actions {
    padding: 0 0 15px 0;
    display: flex;
    gap: 12px;
    border-bottom: 0;
}

.project-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #fff !important;
    color: rgb(192, 38, 211) !important;
    border: 1px solid rgb(192, 38, 211) !important;
    padding: 10px 15px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    border-radius: 5px !important;
}

.outline-btn {
    border: 1px solid rgb(192, 38, 211) !important;
    color: rgb(192, 38, 211) !important;
    border-radius: 5px !important;
    padding: 10px 15px !important;
    background-color: #fff !important;
}

.chat-container {
    flex: 1;
    padding: 45px;
    overflow-y: auto;
    overflow-x: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-width: 0;
    transition: all 0.3s ease;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chat-container ul, ol {
    margin-left: 1.5rem;
    white-space: normal;
  }

  .chat-container li {
    margin-bottom: 0.5rem;
  }

  .chat-container strong {
    font-weight: bold;
  }

  .chat-container em {
    font-style: italic;
  }

.analytics-sidebar.active ~ .chat-container {
    width: calc(100% - var(--analytics-width));
    overflow-x: auto;
    min-width: 550px;
}

.message {
    display: flex;
    margin: 10px 0;
    max-width: 100%;
    flex-wrap: nowrap;
    align-items: flex-start;
}

.ai-message {
    justify-content: flex-start;
    flex-basis: 1%;
    /* flex-grow: 0.7; */
    max-width: 90%;
    width: 90%;
}

.message-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    align-content: center;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    display: flex;
    background: color(srgb 0.9885 0.8666 0.9961);
    margin-top: 0;
}

.message-icon.user {
    color: #c026d3;
    background: #e6e6e6;
}

.user-message {
    justify-content: flex-end;
    margin-left: 40%;
    flex-grow: 0;
    flex-basis: auto;
    max-width: 55%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

.message-bubble {
    max-width: 100%;
    padding: 10px;
    border-radius: 5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: auto;
    overflow: visible;
}

.ai-message .message-bubble {
    background-color: #fff;
    color: #333;
    border: 1px solid #e2dede;
    margin-left: 2%;
    text-align: left;
    margin-right: auto;
    overflow-wrap: break-word;
    width: 100%;
}

.user-message .message-bubble {
    background-color: color(srgb 0.977 0.931 0.98);
    border: 1px solid #fbdffe;
    width: 100%;
    margin-left: 2%;
    text-align: left;
    overflow-wrap: break-word;
}

.retry-container {
    display: flex;
    align-items: center;
    margin-left: 8px;
    margin-top: 2px;
}

.retry-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s ease;
    width: 24px;
    height: 24px;
}

.retry-btn:hover {
    background-color: #f0f0f0;
    color: #c026d3;
    transform: scale(1.1);
}

.retry-btn svg {
    width: 14px;
    height: 14px;
}

.retry-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.message-content {
    margin-top: 8px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
}

.message-content h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.message-content ul {
    margin-left: 24px;
    margin-bottom: 12px;
}

.message-content li {
    margin-bottom: 4px;
}

.message-content table {
    width: 100%;
    min-width: 400px;
    border-collapse: collapse;
    table-layout: auto;
}

.message-content th,
.message-content td {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 250px;
}
x
.message-bubble ul {
    margin: 1.5rem;
    /* Your styles here */
}

ul {
    margin: 1.5rem;
}

.price-comparison {
    margin-top: 16px;
    width: 100%;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 10px;
}

.price-comparison table {
    width: 100%;
    min-width: 400px;
    border-collapse: collapse;
}

.price-comparison th,
.price-comparison td {
    padding: 8px 12px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.price-comparison th {
    background-color: #f9f9f9;
    font-weight: 600;
}

/* Fix for tables in general */
.chat-container table {
    table-layout: auto;
    min-width: auto;
    width: 100%;
}

.ui.table {
    margin: 0;
    width: 100%;
}

.message-input-container {
    padding: 15px 0 0 0;
    display: flex;
    gap: 10px;
    border-top: 0;
}

#input-message {
    width: 100% !important;
}

.send-btn {
    padding: 10px 15px;
    background-image: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

.send-btn:hover {
    opacity: 0.9;
}

.ui.fluid.input input {
    flex-grow: 1;
    font-size: 16px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Analytics Sidebar Styles */
.analytics-sidebar {
    position: absolute;
    right: 0;
    top: 60px; /* Position below the header */
    width: var(--analytics-width);
    max-width: 400px;
    background-color: var(--sidebar-background);
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
    display: none; /* Initially hidden */
    height: calc(100% - 60px);
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 5;
    padding-bottom: 20px;
}

.analytics-sidebar.active {
    display: block;
}

.analytics-container {
    padding: 16px;
    overflow-y: auto;
    height: 100%;
}

.analytics-section {
    padding: 16px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.analytics-section.savings, .analytics-section.contract {
    background-image: linear-gradient(to right bottom, rgb(255, 255, 255), rgb(252, 231, 243));
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.savings-amount {
    display: flex;
    align-items: baseline;
    margin: 8px 0;
}

.currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--success-color);
}

.amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--success-color);
}

.savings-percentage {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--success-color);
    font-size: 0.9rem;
}

.location-analysis {
    margin-top: 16px;
}

.location-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.location-name {
    min-width: 80px;
    flex: 0 0 80px;
    font-weight: 500;
}

.savings-amount {
    min-width: 100px;
    flex: 0 0 100px;
    text-align: right;
    color: var(--success-color);
    font-weight: 500;
}

.progress-container {
    flex: 1;
    min-width: 100px;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin: 0 12px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-image: var(--primary-gradient);
}

.progress-bar.nyc {
    width: 85%;
}

.progress-bar.la {
    width: 65%;
}

.progress-bar.chicago {
    width: 55%;
}

.contract-details {
    margin-top: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
}

/* Modal Styles */
.ui.modal {
    font-size: 0.875rem;
    max-width: 700px !important;
    margin: 0 auto !important;
}

.ui.modal .header {
    font-size: 1.2rem !important;
}

.ui.modal .content {
    padding: 1.1rem;
    line-height: 1.1 !important;
}

.ui.modal .inline.fields {
    margin-bottom: 0.5rem;
}

.ui.modal .ui.checkbox label {
    padding-left: 1.5rem;
}

.ui.modal .content p, 
.ui.modal .content label, 
.ui.modal .content input,
.ui.modal .content textarea,
.ui.modal .content .text,
.ui.modal .content .description,
.ui.modal .actions .button,
.ui.modal .dropdown,
.ui.modal .dropdown .item,
.ui.modal .dropdown .menu,
.ui.modal .dropdown .text {
    font-size: 0.875rem;
}

.close.icon {
    color: #000 !important;
    right: 0 !important;
    top: 0 !important;
}

.ui.dimmer {
    background-color: rgba(0, 0, 0, 0.45);
}

.file-upload-area {
    padding: 48px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    text-align: center;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.file-upload-area.highlight {
    background-color: #fcddfe;
    border-color: rgb(192, 38, 211);
}

.upload-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 16px;
}

.file-format-info {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin: 8px 0 16px;
}

.select-files-btn {
    margin-top: 16px;
    background-image: var(--primary-gradient) !important;
}

.required-documents {
    background-color: rgb(253 244 255);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.required-documents h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    /* color: #b75c00; */
    margin-bottom: 12px;
}

.required-documents ul {
    margin-left: 32px;
}

.required-documents li {
    margin-bottom: 8px;
}

.uploaded-documents h3 {
    margin-bottom: 16px;
}

.document-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 8px;
}

.document-icon {
    font-size: 1.5rem;
    margin-right: 16px;
}

.document-details {
    flex: 1;
}

.document-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.document-size {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.document-actions {
    display: flex;
    gap: 16px;
}

.view-link, .remove-link {
    color: rgb(192, 38, 211);
    text-decoration: none;
}

.remove-link {
    color: #dc3545;
}

/* Create Project Modal */
.quick-start-card, .template-card {
    cursor: pointer !important;
    background-color: #fff !important;
    transition: all 0.2s ease !important;
}

.quick-start-card.selected, .template-card.selected {
    border: 0.5px solid rgb(192, 38, 211) !important;
    box-shadow: 0 0 0 1px rgb(192, 38, 211) !important;
    background-color: rgb(253, 244, 255) !important;
}

.subtitle {
    font-size: 0.85rem;
    font-weight: normal;
    color: var(--secondary-color);
}

.project-goals {
    gap: 24px;
    margin: 24px 0;
}

.project-parameters {
    display: flex;
    gap: 24px;
    margin: 24px 0;
}

.timeline, .target-savings {
    flex: 1;
}

/* Adjust modal buttons to match the new style */
.ui.button.primary {
    background-image: var(--primary-gradient) !important;
    color: white !important;
    padding: 0.6rem 1.2rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
}

.ui.button.cancel {
    background-color: white !important;
    color: rgb(192, 38, 211) !important;
    border: 1px solid rgb(192, 38, 211) !important;
    padding: 0.6rem 1.2rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
}

.ui.modal.create-project {
    color: var(--secondary-color);
}

.ui.modal.create-project .header {
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.ui.modal.create-project h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
}

.ui.modal.create-project .section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

.ui.modal.create-project p,
.ui.modal.create-project .text,
.ui.modal.create-project input::placeholder,
.ui.modal.create-project textarea::placeholder,
.ui.modal.create-project .dropdown .text {
    color: var(--secondary-color);
}

.ui.modal.create-project label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: block;
}

.ui.modal.create-project .form-section {
    margin-bottom: 1.5rem;
}

.ui.modal.create-project .template-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

/* Suggestions below AI messages */
.suggestions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    margin-left: 2%;
    flex-wrap: wrap;
}

.suggestions .suggestion {
    padding: 5px 10px;
    background-color: #fcddfe;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 5px;
}

.suggestions .suggestion:hover {
    background-color: #d1b8ff;
}

/* Utility classes */
.m-p5 {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.m-p1 {
    margin-left: 0.1rem;
    margin-right: 0.1rem;
    vertical-align: middle;
}

.h-4 {
    height: 4rem;
    color:#c026d3;
}

.h-2 {
    height: 2rem;
    color:#c026d3;
}

/* Responsive Design */
@media (min-width: 1200px) {
    .analytics-sidebar.active ~ .chat-container {
        width: calc(100% - var(--analytics-width));
        min-width: 550px;
    }
}

@media (max-width: 1200px) {
    .analytics-sidebar {
        width: 320px;
        max-width: 320px;
    }
    
    .analytics-sidebar.active ~ .chat-container {
        width: calc(100% - 320px);
        min-width: 550px;
    }
    
    .user-message {
        margin-left: auto;
        max-width: 70%;
    }
    
    .ai-message {
        flex-basis: auto;
        /* flex-grow: 0.7; */
        max-width: 75%;
        width: 75%;
    }
}

@media (max-width: 991px) {
    .analytics-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 320px;
        max-width: 320px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .analytics-sidebar.active {
        transform: translateX(0);
    }
    
    .analytics-sidebar.active ~ .chat-container {
        width: 100%;
        min-width: 100%;
    }
    
    .user-message {
        margin-left: auto;
        flex-basis: auto;
        max-width: 75%;
    }
    
    .ai-message {
        flex-basis: auto;
        /* flex-grow: 0.7; */
        max-width: 75%;
        width: 75%;
    }
}

@media (max-width: 768px) {
    :root {
        --analytics-width: 100%;
    }
    
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        min-width: 100%;
        flex: none;
        height: auto;
        flex-shrink: 0;
        max-height: 40vh;
    }
    
    .main-content {
        height: 60vh;
        width: 100% !important;
        padding: 10px;
        flex: 1;
    }
    
    .analytics-sidebar {
        width: 100%;
        max-width: 100%;
        position: fixed;
        height: calc(100vh - 60px);
        top: 60px;
    }
    
    .user-message {
        margin-left: auto;
    }
    
    .message-content table {
        max-width: 100%;
        overflow-x: auto;
        display: block;
    }
}

@media (max-width: 576px) {
    .user-message {
        margin-left: auto;
        max-width: 85%;
    }
    
    .ai-message {
        max-width: 95%;
        width: 95%;
    }
    
    .project-title {
        font-size: 20px;
    }
    
    .analytics-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .project-actions {
        flex-wrap: wrap;
    }
}

.ui.modal .card .header {
    font-size: 1rem !important;
}

.ui.modal .card .description {
    font-size: 0.875rem;
}

.ui.modal h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.ui.modal .actions {
    padding: 1rem 1.5rem;
    background-color: #f9f9f9;
}

.ui.modal .actions .button {
    padding: 0.6rem 1.2rem;
}

.ui.modal.create-project .header {
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.ui.modal.create-project .content {
    padding: 1.5rem;
}

.ui.modal.create-project label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: block;
}

.ui.modal.create-project input,
.ui.modal.create-project textarea,
.ui.modal.create-project select,
.ui.modal.create-project .dropdown {
    width: 100%;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.6rem;
    margin-bottom: 1rem;
}

.ui.modal.create-project .dropdown .text,
.ui.modal.create-project .dropdown .item {
    font-size: 0.875rem !important;
}

.ui.modal.create-project .card {
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease !important;
    margin-bottom: 1rem !important;
}

.ui.modal.create-project .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1) !important;
}

.ui.modal.create-project .card .header {
    font-size: 1rem !important;
    padding: 1rem !important;
    border-bottom: none !important;
}

.ui.modal.create-project .card .description {
    font-size: 0.875rem !important;
    padding: 0 1rem 1rem 1rem !important;
    color: var(--secondary-color) !important;
}

.ui.modal.create-project .project-parameters {
    background-color: rgb(253, 244, 255);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    margin-bottom: 24px;
}

.ui.modal.create-project .ui.dropdown .menu > .item {
    font-size: 0.875rem !important;
}

.ui.modal.create-project .actions {
    padding: 1rem 1.5rem;
    background-color: #f9f9f9;
    border-top: 1px solid var(--border-color);
}

.ui.modal.create-project .dropdown .item {
    color: var(--secondary-color) !important;
}

.ui.modal.create-project .ui.dropdown .menu > .item {
    font-size: 0.875rem !important;
    color: var(--secondary-color) !important;
}

.ui.modal.create-project input,
.ui.modal.create-project textarea,
.ui.modal.create-project select {
    color: var(--secondary-color);
}

.ui.modal.create-project .card .content {
    color: var(--secondary-color);
}

.ui.modal.create-project .card .header {
    font-size: 1rem !important;
    padding: 1rem !important;
    border-bottom: none !important;
    color: var(--text-color) !important;
}

.ui.modal.create-project .card .meta {
    color: var(--secondary-color) !important;
}

.ui.modal.create-project .info-text,
.ui.modal.create-project .helper-text,
.ui.modal.create-project .description,
.ui.modal.create-project .note {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.ui.modal.create-project .project-parameters .field label {
    color: var(--text-color);
}

.ui.modal.create-project .project-parameters .description {
    color: var(--secondary-color);
}

.ui.modal.create-project .time-estimate,
.ui.modal.create-project .savings-estimate {
    color: var(--secondary-color);
    font-weight: normal;
}

/* Ensure dropdown placeholder text is secondary color */
.ui.modal.create-project .ui.dropdown .default.text {
    color: var(--secondary-color) !important;
}

/* Ensure table content doesn't overflow */
.message-content table {
    width: 100%;
    max-width: 100%;
}

.ui.table {
    table-layout: auto;
    min-width: 100%;
}

/* Fix for tables getting cut off when analytics is visible */
.chat-container table {
    width: 100%;
    min-width: 400px;
    table-layout: fixed;
    border-collapse: collapse;
}

.chat-container table th,
.chat-container table td {
    padding: 8px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    border: 1px solid var(--border-color);
} 

.ui.loader {
    background: none !important;
}   

#new-chat {
    display: inline-flex;
    margin-left: 10px;
}

.displayNo {
    display: none;
}

/* Terms and Conditions Styles */
.terms-content {
    padding: 20px;
    /* max-width: 800px; */
    margin: 0 auto;
}

.terms-content .welcome-text {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #333;
}

.terms-section {
    margin-bottom: 30px;
}

.terms-section h2.ui.header {
    color: #2c3e50;
    font-size: 1.4em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.terms-section .ui.list {
    margin-left: 20px;
}

.terms-section .ui.list li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
}

.terms-section a {
    color: #2185d0;
    text-decoration: none;
}

.terms-section a:hover {
    text-decoration: underline;
}

.chart-wrapper>canvas {
    border: 1px solid color(srgb 0.8863 0.8706 0.8707);
    padding: 10px;
    border-radius: 5px;
}

/* Enhanced Get Quote Modal Styles */
#getQuoteModal .content {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

#getQuoteModal .ui.segment {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

#getQuoteModal .ui.header {
    color: var(--text-color);
    margin-bottom: 1rem;
}

#getQuoteModal .required {
    color: #db2828;
    font-weight: bold;
}

#getQuoteModal .quote-screen {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#getQuoteModal .field.disabled {
    opacity: 0.6;
}

#getQuoteModal .grouped.fields {
    margin-bottom: 1rem;
}

#getQuoteModal .field {
    margin-bottom: 1rem;
}

#getQuoteModal input[readonly] {
    background-color: #f9f9f9;
    cursor: not-allowed;
}

#getQuoteModal .ui.dropdown {
    min-height: 38px;
}

#getQuoteModal .ui.multiple.dropdown .label {
    background-color: var(--primary-color) !important;
    color: white !important;
    font-weight: 500 !important;
    font-size: 0.8rem !important;
}

#staticIpOptions {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

#getQuoteModal .actions {
    padding: 1rem 2rem;
    background-color: #f9f9f9;
    border-top: 1px solid var(--border-color);
}

#getQuoteModal .actions .button {
    margin: 0 0.5rem;
}

/* Loading and error states */
#loadingLocations, #errorLoadingLocations {
    margin: 1rem 0;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #getQuoteModal .content {
        padding: 1rem;
    }
    
    #getQuoteModal .two.fields {
        flex-direction: column;
    }
    
    #getQuoteModal .two.fields .field {
        width: 100% !important;
        margin-right: 0 !important;
    }
}

/* Quote Results Styles */
.quote-results-container {
    margin: 2rem 0;
    font-family: ui-sans-serif, system-ui, sans-serif;
    line-height: 1.5;
}

.quote-header-section {
    margin-bottom: 1.5rem;
}

.quote-header-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.quote-header-section i {
    color: rgba(220, 174, 226, 1);
}

.quote-header-section h2 {
    transition: all 0.3s ease;
}

.quote-header-section h2.highlight-quote {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 400% 400%;
    animation: highlightPulse 2s ease-in-out;
    border-radius: 8px;
    padding: 10px 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

@keyframes highlightPulse {
    0% {
        background-position: 0% 50%;
        transform: scale(1);
    }
    50% {
        background-position: 100% 50%;
        transform: scale(1.05);
    }
    100% {
        background-position: 0% 50%;
        transform: scale(1.02);
    }
}

.request-details-box {
    background: linear-gradient(135deg, #e8f4fd 0%, #d6eaff 100%);
    border: 1px solid #b8d4f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.request-details-box h3 {
    color: #2563eb;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.5rem;
}

.detail-grid div {
    font-size: 1rem;
    color: #374151;
}

.detail-grid strong {
    color: #1f2937;
}

.quote-options-container {
    margin: 1.5rem 0;
}

.quote-option {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.quote-option.recommended {
    border-color: #10b981;
    box-shadow: 0 0 0 1px #10b981;
}

.quote-option-header {
    background-color: #f9fafb;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quote-option.recommended .quote-option-header {
    background-color: #f0fdf4;
}

.quote-option-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.recommended-badge {
    background-color: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.copy-icon {
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s ease;
}

.copy-icon:hover {
    color: var(--primary-color);
}

.quote-option-details {
    padding: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 1rem;
}

.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 1rem;
}

.detail-row strong {
    color: #374151;
    font-weight: 500;
}

.quote-id {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: #6b7280;
}

/* Expandable Other Charges Styles */
.expandable-section {
    flex-direction: column;
    align-items: flex-start;
}

.expandable-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
    transition: color 0.2s ease;
}

.expandable-header:hover {
    color: var(--primary-color);
}

.expand-icon {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.expandable-content {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

.other-charge-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.other-charge-row:last-child {
    border-bottom: none;
}

.other-charge-row span:first-child {
    font-weight: 500;
}

.click-to-order-btn {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    width: auto;
    margin-top: 0.5rem;
}

.click-to-order-btn:hover {
    background: linear-gradient(135deg, #db2777 0%, #9d174d 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(236, 72, 153, 0.3);
}

.click-to-order-btn i {
    font-size: 1rem;
}

.quote-actions-bottom {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.quote-actions-bottom .ui.button {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    display: flex;
    align-items: center;
    /* gap: 0.5rem; */
}

#showMoreQuotes {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

#showMoreQuotes:hover {
    background-color: #fdf2f8;
}

#downloadQuotesExcel {
    background-image: var(--primary-gradient);
    color: white;
    font-weight: 500 !important;
    border: none;
}

#downloadQuotesExcel:hover {
    opacity: 0.9;
}

#additionalQuotes {
    margin-top: 1rem;
}

#additionalQuotes .quote-option {
    margin-bottom: 1rem;
}

/* Responsive adjustments for quote results */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .quote-option-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .recommended-badge {
        align-self: flex-start;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .expandable-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .quote-actions-bottom {
        flex-direction: column;
    }
    
    .quote-actions-bottom .ui.button {
        width: 100%;
        justify-content: center;
    }
}

/* Direct Quote Button Styles */
.direct-quote-btn {
    background-color: #ff6b6b !important;
    color: white !important;
}

.direct-quote-btn:hover {
    background-color: #ff5252 !important;
    color: white !important;
}

.direct-quote-btn .icon {
    color: white !important;
}

/* Quote Response Styles */
.quote-response-container {
    margin: 1rem 0;
    font-family: inherit;
}

.quote-header {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid #dee2e6;
}

.quote-header h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.quote-header p {
    margin: 0.25rem 0;
    color: #6c757d;
}

.location-section {
    margin: 1rem 0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.location-section h4 {
    background-color: #e9ecef;
    margin: 0;
    padding: 0.75rem 1rem;
    color: #495057;
    font-size: 1.1rem;
    border-bottom: 1px solid #dee2e6;
}

.quote-options {
    padding: 1rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.quote-offering {
    display: flex;
    flex-direction: column;
}

.quote-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.quote-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quote-header-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-quote .quote-header-section {
    /* background: var(--primary-gradient); */
    /* background: linear-gradient(to right, rgb(192, 39, 219), rgb(92, 38, 211));*/
    background: linear-gradient(to right, rgba(200, 38, 183, 1), rgba(14, 9, 230, 0.76));
    opacity: 0.9;

}

.provider-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quote-header-section h5 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.priority-badge {
    font-size: 0.8rem;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    align-self: flex-start;
    font-weight: 500;
}

.top-quote .priority-badge {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.quote-price {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.mrc-amount {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
}

.activation-fee {
    font-size: 0.7rem;
    font-weight: 400;
    margin-top: 2px;
    opacity: 0.9;
}

.quote-details {
    padding: 1rem;
    flex-grow: 1;
}

.quote-row {
    margin: 0.5rem 0;
    padding: 0.25rem 0;
    border-bottom: 1px solid #f1f3f4;
    font-weight: 500;
    color: #495057;
}

.quote-row:last-child {
    border-bottom: none;
}

.address-row {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c3e50;
}

.term-row {
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
}

.bandwidth-row {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    font-family: 'Courier New', monospace;
}

.ip-row {
    font-size: 0.95rem;
    font-weight: 500;
    color: #6c757d;
}

.construction-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 0.5rem;
    margin: 0.5rem 0;
    color: #856404;
}

.construction-warning strong {
    color: #856404;
}

.pricing-breakdown {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #e9ecef;
}

.pricing-breakdown strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 0.5rem;
}

.pricing-breakdown ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.pricing-breakdown li {
    margin: 0.25rem 0;
    color: #6c757d;
}

.quote-actions {
    padding: 1rem;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.add-to-cart-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6b4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.add-to-cart-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.add-to-cart-btn i {
    font-size: 1.1rem;
}

.add-to-cart-btn.top-quote-btn {
    /* background: var(--primary-gradient); */
    background: linear-gradient(to right, rgba(200, 38, 183, 1), rgba(14, 9, 230, 0.76));
}

.add-to-cart-btn.top-quote-btn:hover {
    background: linear-gradient(to right, rgb(200, 35, 110), rgb(175, 35, 195));
    box-shadow: 0 4px 8px rgba(219, 39, 119, 0.3);
}

.add-to-cart-btn.adding {
    background: linear-gradient(135deg, #6c757d 0%, #adb5bd 100%) !important;
    cursor: not-allowed;
    transform: none !important;
}

.add-to-cart-btn.adding:hover {
    background: linear-gradient(135deg, #6c757d 0%, #adb5bd 100%) !important;
    transform: none !important;
    box-shadow: none !important;
}

.add-to-cart-btn .spinner.loading.icon {
    animation: spin 1s linear infinite;
}

.direct-quote-btn {
    display: none !important;
}

 #quotesTable thead th
{
    text-align: center;
    vertical-align: middle;
}

#quotesTable thead th {
    font-size: 1rem !important;
    font-weight: 600 !important;
    
  }

#quotesTable tbody td {
    font-size: 1rem;
  }

  .dataTables_info {
  font-size: 1rem;
}

/* Pagination buttons */
.dataTables_paginate {
  font-size: 1rem;
}

#displayQuotesModalContent
{
    padding-top: 30px !important;
}

#quotesTable,
#quotesTable th,
#quotesTable td {
  /* border: 2px solid #999; */
  border-collapse: collapse;
}

#quotesTable {
  border-collapse: collapse; /* ensures borders don’t double up */
  width: 100%; 
}

.paginate_button 
{
    font-size: 13px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive table styles */
@media (max-width: 768px) {
    #addressesTable .ui.table {
        font-size: 0.9rem;
    }
    
    #addressesTable .ui.table th,
    #addressesTable .ui.table td {
        padding: 0.5rem;
    }
    
    .quote-options {
        grid-template-columns: 1fr;
    }
    
    .quote-header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .provider-info {
        align-items: flex-start;
        width: 100%;
    }
    
    .quote-row {
        gap: 0.25rem;
    }
}