@viewport{
    width: device-width;
}
:root {
    font-family: Arial, Helvetica, sans-serif;
    --font-size-small: 18px;
    --font-size-medium: 20px;
    --font-size-large: 26.25px;
    --font-size-x-large: 42px;
    --font-size-normal: 21px;
    --font-size-larger: 32px;
    --font-size-smaller: 14px;
    --base-background-color:#f0f0f0;
    --deep-blue-gradient: linear-gradient(135deg, rgb(2, 3, 129) 0%, rgb(40, 116, 252) 100%);
    --vivid-orange: #ff6900;
    --vivid-amber:#fcb900;
    --vivid-pale-orange: #ed6e00;
    --vivid-purple: #9b51e0;
    --cyan-blue: #0693e3;
    --deep-blue: #00387b;
    --deep-blue-hover: #004ad1;
    --light-green-cyan: #00ff80;
    --vivid-green: #00d084;
    --green: #61993b;
    --grey: #6d6d6d;
    --black: #000000;
    --white: #ffffff;
    --shadow-natural: 6px 6px 9px rgba(0, 0, 0, 0.2);
    --shadow-deep:12px 12px 50px rgba(0, 0, 0, 0.4);
    --shadow-outline:6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1);
    --shadow-crisp:6px 6px 0px rgba(0, 0, 0, 1);

    /* Color-coded issue category colors */
    --electrical-color: #ff9800;
    --mechanical-color: #2196f3;
    --software-color: #9c27b0;
    --other-color: #607d8b;
    
    /* Diagnosis outcome colors */
    --success-color: #4caf50;
    --partial-color: #ff9800;
    --fail-color: #f44336;

    /* Product group colors */
    --parkingsystems-color: #673ab7;
    --automaticdoor-color: #062edf;
    --doorhardware-color: #00bcd4;
    --securitysystems-color: #ffc107;
    --specialistdoor-color: #9b51e0;

}

body {
    font-family: Arial, sans-serif;
    text-align: left;
    margin: 0;
}
html, body{
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}



.logo{
    height: 35px;
}
/* BUTTON CLASSES */
.btn-vivid {
  
  --bs-btn-color:           #fff;                 
  --bs-btn-bg:              var(--vivid-orange);  
  --bs-btn-border-color:    var(--vivid-orange);  
  --bs-btn-hover-bg:        white;    
  --bs-btn-hover-color:  var(--vivid-orange);          
  --bs-btn-hover-border-color: var(--vivid-orange);
  --bs-btn-active-bg:       #c55500;              
  --bs-btn-active-border-color:#c55500;
  --bs-btn-disabled-bg:     #ff9e4d;            
  --bs-btn-disabled-border-color:#ff9e4d;
}


.btn-vivid-blue {
    background-color: var(--deep-blue) !important;
    color: #fff !important;
    border: none !important;
}
.btn-vivid-blue:hover,
.btn-vivid-blue:focus {
    background-color: var(--deep-blue-hover) !important;
    color: #fff !important;
}

/* footer */
.site-footer{
    background-color: var(--cyan-blue);
    color: var(--white);
    text-align: center;
    padding: 20px 0;
    font-size: var(--font-size-small);
    box-shadow: var(--shadow-natural);
    
}
/* CONTENT */
.content{
    padding: 120px 20px 40px;
    max-width: fit-content;
    margin: 0 auto;
    text-align: center;
}

.content h1{
    font-size: var(--font-size-x-large);
    color: var(--deep-blue);
    margin-bottom: 20px;
}

.content p{
    font-size: var(--font-size-medium);
    color: var(--grey);
    margin-bottom: 15px;
}
/* LOGIN */
.login-signup-page{
    max-width: 400px;
    margin: 80px auto;
    padding: 30px;
    background-color: var(--base-background-color);
    box-shadow: var(--shadow-natural);
    border-radius: 8px;
    text-align: left;
}

.login-signup-page h2{
    color: var(--deep-blue);
    text-align: center;
}

.login-signup-page form{
    display: flex;
    flex-direction: column;
}

.login-signup-page input[type='text'],
.login-signup-page input[type='password']{
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.card-container{
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    padding: 30px;
    margin-top: 100px;
}

.row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.column {
    flex: 1;
}

textarea, input, select{
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    box-sizing: border-box;
}

.button-primary{
    background-color: var(--cyan-blue);
    color: var(--white);
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 3px;
}

.logout-page{
    padding-top: 120px;
}

h1 {
    color: #00387b;
}
/* HOMEPAGE CARDS */
.tile-card {
  /* smooth motion + colour changes */
  transition: transform .15s, box-shadow .15s, background-color .15s, color .15s;

  width: 20rem;
  height: 100%;
  flex: 1 1 auto;

  /* background-color: var(--deep-blue); */
  color: var(--deep-blue);                         /* default text colour inside the card */
}

/* icon inherits but we override to be explicit */
.tile-card .icon {
  
  background: linear-gradient(
    to bottom,
    var(--deep-blue) 0%,
    var(--cyan-blue) 50%,
    var(--deep-blue) 100%
  );
 
  -webkit-background-clip: text; /* Safari / Chrome */
          background-clip: text; /* Firefox (behind about:config flag) */
  
  color: transparent;
 
  transition: background-position .15s; 
}

.tile-card h3,
.tile-card p {
  color: inherit;
}

.tile-card:hover,
.tile-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 .75rem 1.5rem rgba(0,0,0,.15);
  background-color: var(--vivid-orange);
  color: var(--white);             
}

/* icon flips to deep-blue too */
.tile-card:hover .icon,
.tile-card:focus-within .icon {
  color: white;
}


/* CHAT BOX */
#chat2 .form-control {
  border-color: transparent;
}
#chat2 .form-control:focus {
  border-color: transparent;
  box-shadow: inset 0 0 0 1px transparent;
}

#chat2 {
  height: 60vh;            /* overall card height */
  display: flex;
  flex-direction: column;
}
#chat2 .card-body {
  flex: 1 1 auto;          /* grow/shrink to fill */
  overflow-y: auto;
}

@media (max-width: 576px) {
    #chat2 {
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0 !important;
    }
}
.chat-box {
    min-height: 50vh;
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    flex-grow: 1;
    flex-shrink: 0;
}

.divider:before,
.divider:after {
  content: "";
  flex: 1;
  height: 1px;
  background: #eee;
}

/* user bubble */
.bg-user {
  background-color: var(--cyan-blue); /* whatever “lighter blue” you like */
  color: #fff;               /* keep text white */
}
.bg-assistant {
	background-color: #f2f2f2; /* Light gray background */
	text-align: left;
}

/* static/css/manual_search.css */
#manual-search .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 1.25rem rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
}

/* click-to-copy alert */
.invite-copy {
    cursor: pointer;
}

/* limit width of the Excel upload */
#repair-history .excel-upload {
    max-width: 300px;
}

/* lift cards on hover (only on this page) */
#repair-history .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 1.25rem rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
}

/* add new button on repair page*/
.btn-custom-green {
    background-color: var(--vivid-green);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-custom-green:hover {
    background-color: var(--light-green-cyan) !important;
    color: var(white) !important;
    border-color: var(--light-green-cyan) !important;
    text-decoration: none;
}


/* filter button on repair history page*/
.filter-toggle-btn {
    background: rgba(128, 128, 128, 0.2); 
    border: none;
    color: black;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* box-shadow: 0 4px 15px rgba(0, 56, 123, 0.3); */
    position: relative;
    overflow: hidden;
}

.filter-toggle-btn:hover::before {
    left: 100%;
}

.filter-toggle-btn:hover {
    /* transform: translateY(-2px); */
    box-shadow: var(--shadow-natural);
}

.btn-option {
    background-color: white;
    border: 2px solid #e0e0e0;
    color: #666;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.btn-option:active, .btn-option.selected {
    background-color: #c6c6c6;
    color: white;
}

.btn-option:hover::before {
    left: 100%;
}

.btn-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Issue Category Colors */
.issue-option[data-value="electrical"] {
    border-color: var(--electrical-color);
    color: var(--electrical-color);
}
.issue-option[data-value="electrical"]:hover, 
.issue-option[data-value="electrical"].selected {
    background-color: var(--electrical-color);
    color: white;
}

.issue-option[data-value="mechanical"] {
    border-color: var(--mechanical-color);
    color: var(--mechanical-color);
}
.issue-option[data-value="mechanical"]:hover, 
.issue-option[data-value="mechanical"].selected {
    background-color: var(--mechanical-color);
    color: white;
}

.issue-option[data-value="software"] {
    border-color: var(--software-color);
    color: var(--software-color);
}
.issue-option[data-value="software"]:hover, 
.issue-option[data-value="software"].selected {
    background-color: var(--software-color);
    color: white;
}

.issue-option[data-value="other"] {
    border-color: var(--other-color);
    color: var(--other-color);
}
.issue-option[data-value="other"]:hover, 
.issue-option[data-value="other"].selected {
    background-color: var(--other-color);
    color: white;
}

/* Diagnosis Outcome Colors */
.diagnosis-option[data-value="success"] {
    border-color: var(--success-color);
    color: var(--success-color);
}
.diagnosis-option[data-value="success"]:hover, 
.diagnosis-option[data-value="success"].selected {
    background-color: var(--success-color);
    color: white;
}

.diagnosis-option[data-value="partial"] {
    border-color: var(--partial-color);
    color: var(--partial-color);
}
.diagnosis-option[data-value="partial"]:hover, 
.diagnosis-option[data-value="partial"].selected {
    background-color: var(--partial-color);
    color: white;
}

.diagnosis-option[data-value="fail"] {
    border-color: var(--fail-color);
    color: var(--fail-color);
}
.diagnosis-option[data-value="fail"]:hover, 
.diagnosis-option[data-value="fail"].selected {
    background-color: var(--fail-color);
    color: white;
}

/* Product Group Colors */
.product-group-option[data-value="parking systems"] {
    border-color: var(--parkingsystems-color);
    color: var(--parkingsystems-color);
}
.product-group-option[data-value="parking systems"]:hover, 
.product-group-option[data-value="parking systems"].selected {
    background-color: var(--parkingsystems-color);
    color: white;
}

.product-group-option[data-value="automatic doors"] {
    border-color: var(--automaticdoor-color);
    color: var(--automaticdoor-color);
}
.product-group-option[data-value="automatic doors"]:hover, 
.product-group-option[data-value="automatic doors"].selected {
    background-color: var(--automaticdoor-color);
    color: white;
}

.product-group-option[data-value="door hardware"] {
    border-color: var(--doorhardware-color);
    color: var(--doorhardware-color);
}
.product-group-option[data-value="door hardware"]:hover, 
.product-group-option[data-value="door hardware"].selected {
    background-color: var(--doorhardware-color);
    color: white;
}

.product-group-option[data-value="security systems"] {
    border-color: var(--securitysystems-color);
    color: var(--securitysystems-color);
}
.product-group-option[data-value="security systems"]:hover, 
.product-group-option[data-value="security systems"].selected {
    background-color: var(--securitysystems-color);
    color: white;
}

.product-group-option[data-value="specialist doors"] {
    border-color: var(--specialistdoor-color);
    color: var(--specialistdoor-color);
}
.product-group-option[data-value="specialist doors"]:hover, 
.product-group-option[data-value="specialist doors"].selected {
    background-color: var(--specialistdoor-color);
    color: white;
}

.product-group-option[data-value="other"] {
    border-color: var(--other-color);
    color: var(--other-color);
}
.product-group-option[data-value="other"]:hover, 
.product-group-option[data-value="other"].selected {
    background-color: var(--other-color);
    color: white;
}


/* Icons for categories */
.btn-option::after {
    font-family: 'Bootstrap Icons';
    font-size: 16px;
    opacity: 0.7;
}

/* Issue Category Icons */
.issue-option[data-value="electrical"]::after {
    content: '⚡';
}
.issue-option[data-value="mechanical"]::after {
    content: '⚙️';
}
.issue-option[data-value="software"]::after {
    content: '💻';
}
.issue-option[data-value="other"]::after {
    content: '❓';
}

/* Diagnosis Outcome Icons */
.diagnosis-option[data-value="success"]::after {
    content: '✅';
}
.diagnosis-option[data-value="partial"]::after {
    content: '⚠️';
}
.diagnosis-option[data-value="fail"]::after {
    content: '❌';
}

/* Product Group Icons */
.product-group-option[data-value="other"]::after {
    content: '❓';
}
.product-group-option[data-value="parking systems"]::after {
    content: '🚗';
}
.product-group-option[data-value="door hardware"]::after {
    content: '🔧';
}
.product-group-option[data-value="automatic doors"]::after {
    content: '🤖';
}
.product-group-option[data-value="security systems"]::after {
    content: '🔒';
}
.product-group-option[data-value="specialist doors"]::after {
    content: '🛡️';
}

/* Filter section styling */
.filter-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none !important;
}

.choice-group {
    margin-bottom: 1.5rem;
}

.choice-group-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--deep-blue);
    font-size: 16px;
}

.tile-card-2 {
  /* smooth motion + colour changes */
  transition: transform .15s, box-shadow .15s, background-color .15s, color .15s;

  height: 100%; /* still keeps full height for equal cards in grid */
  flex: 1 1 auto; 
  text-align: center;

  /* default colors */
  color: var(--deep-blue);
}

.tile-card-2 .icon {
  background: linear-gradient(
    to bottom,
    var(--deep-blue) 0%,
    var(--cyan-blue) 50%,
    var(--deep-blue) 100%
  );
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  transition: background-position .15s; 
}

.tile-card-2 h3,
.tile-card-2 p {
  color: inherit;
}

.tile-card-2:hover,
.tile-card-2:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 .75rem 1.5rem rgba(0,0,0,.15);
  background-color: var(--vivid-orange);
  color: var(--white);
}

.tile-card-2:hover .icon,
.tile-card-2:focus-within .icon {
  color: white;
}


.node-content img {
  max-width: 100%;
  height: auto;
}


/* Change breadcrumb background */
.custom-breadcrumb {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

/* Change breadcrumb item colors */
.custom-breadcrumb .breadcrumb-item a {
  color: var(--vivid-pale-orange); 
  text-decoration: none;
  transition: color 0.2s;
}

.custom-breadcrumb .breadcrumb-item a:hover {
  color: var(--deep-blue-hover); 
}

/* Current page item */
.custom-breadcrumb .breadcrumb-item.active {
  color: #6c757d; 
  font-weight: 500;
}


.node-content {
    text-align: left !important;
}

/* ============================================================
   DESKTOP POLISH
   ============================================================ */

/* Outcome badges (repair history table + cards) */
.badge-outcome-success { background: var(--success-color); color: #fff; }
.badge-outcome-partial { background: var(--partial-color); color: #fff; }
.badge-outcome-fail    { background: var(--fail-color);    color: #fff; }

/* Toolbar row shared by manuals / repair pages */
.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}
.page-toolbar .search-form {
    flex: 1 1 320px;
    min-width: 240px;
}

/* Repair logging form: grid columns (deterministic, cannot wrap) */
.form-grid-2, .form-grid-3 {
    display: grid;
    gap: 1rem;
}
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 767.98px) {
    .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

/* Guide Studio (authoring) */
.studio-node-child {
    margin-left: 1.75rem;
    padding-left: 1rem;
    border-left: 2px solid #dee2e6;
}
.studio-answer-chip {
    display: inline-block;
    font-size: 0.85rem;
    color: #495057;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 999px;
    padding: 2px 12px;
    margin-bottom: 4px;
}
.studio-node-card { border-left: 4px solid var(--deep-blue, #0d3b66) !important; }
.studio-node-card.studio-outcome { border-left-color: var(--success-color, #4caf50) !important; }
.studio-node-text p:last-child { margin-bottom: 0; }

/* Decision tree pages */
.tree-question { font-size: 1.35rem; font-weight: 600; }
.tree-question p:last-child { margin-bottom: 0; }
.answer-card .card-body { min-height: 72px; }
.outcome-card { border-top: 4px solid var(--success-color) !important; }

/* Manual list: folder path under the filename */
.manual-folder {
    font-size: 0.8rem;
    color: #6c757d;
}

/* ============================================================
   MOBILE / FIELD USE
   Engineers use this on phones, often one-handed. Bottom nav
   keeps the main destinations in thumb reach; touch targets
   are enlarged on small screens.
   ============================================================ */

/* Fixed bottom navigation (shown below lg via .d-lg-none) */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    display: flex;
    background: #fff;
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
    padding-bottom: env(safe-area-inset-bottom); /* iPhone home bar */
}

.mobile-nav-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 56px;
    padding: 6px 2px;
    text-decoration: none;
    color: var(--grey, #6c757d);
    font-size: 12px;
    line-height: 1.1;
}

.mobile-nav-item i {
    font-size: 22px;
}

.mobile-nav-item.active {
    color: var(--deep-blue, #0d3b66);
    font-weight: 600;
}

/* Keep page content and footer clear of the bottom nav */
@media (max-width: 991.98px) {
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }
}

/* Bigger touch targets on phones */
@media (max-width: 576px) {
    /* manual list rows: whole row is tappable, comfortable height */
    .manual-row {
        padding-top: 0.85rem;
        padding-bottom: 0.85rem;
    }

    /* filter chips / choice buttons need finger-sized hit areas */
    .btn-option,
    .btn-sm {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }

    /* pagination controls */
    .pagination .page-link,
    .btn-outline-secondary,
    .btn-outline-primary {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* stop iOS auto-zoom on focus: inputs must be >= 16px */
    input.form-control,
    select.form-select,
    textarea.form-control {
        font-size: 16px;
    }

    /* tighten big desktop paddings so less scrolling on site */
    #manual-search.container,
    #repair-history.container {
        padding-top: 1.25rem !important;
    }
}
