/**
 * Bridge - Shared CSS utilities for Bridge Theme
 */

/* Calibri Font Family */
@font-face {
    font-family: 'Calibri';
    src: url('../fonts/calibri.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Calibri';
    src: url('../fonts/calibri-italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Calibri';
    src: url('../fonts/calibri-regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Calibri';
    src: url('../fonts/calibri-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Calibri';
    src: url('../fonts/calibri-bold-italic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

 /* Bridge Theme Base Styles */

/* Font Awesome Fix for Chrome/Firefox */
@font-face {
    font-family: "Font Awesome 7 Free";
    font-display: swap;
}

@font-face {
    font-family: 'rebranding-icomoon';
    src: url('../fonts/rebranding-icomoon.woff') format('woff'),
    url('../fonts/rebranding-icomoon.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

/* Base styles for rebranding-icon classes */
[class^="rebranding-icon-"], [class*=" rebranding-icon-"] {
    font-family: 'rebranding-icomoon' !important;
    speak: never;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Icomoon font (from old project) - for Settings and Log out icons in header dropdown */
@font-face {
    font-family: 'icomoon';
    src: url('../fonts/icomoon.woff') format('woff'),
    url('../fonts/icomoon.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

/* Settings icon (gear) - matches old project */
.icon-gear:before {
    font-family: 'icomoon';
    content: "\e986";
}

/* Log out icon - matches old project */
.fa-log-out:before {
    font-family: 'icomoon';
    content: "\e960";
}

/* Sign in icon - matches old project (rebranding-icomoon font) */
.rebranding-icon-log-in:before {
    font-family: 'rebranding-icomoon';
    content: "\e92d";
}

/* Rebranding-icomoon icon glyphs (imported from old project) */
.rebranding-icon-supplier-request-approved:before {
    content: "\e92e";
    color: #5d9a16;
}
.rebranding-icon-supplier-request-open:before {
    content: "\e92f";
    color: #93328e;
}
.rebranding-icon-supplier-request-reject:before {
    content: "\e930";
    color: #d50404;
}
.rebranding-icon-newspaper:before {
    content: "\e92c";
    color: #0057b8;
}
.rebranding-icon-minus:before {
    content: "\e928";
}
.rebranding-icon-shopping-cart-2:before {
    content: "\e927";
}
.rebranding-icon-book-open:before {
    content: "\e926";
}
.rebranding-icon-external-link-rec:before {
    content: "\e925";
}
.rebranding-icon-edit-3:before {
    content: "\e924";
}
.rebranding-icon-complaint-feedback-comment-2:before {
    content: "\e923";
}
.rebranding-icon-complaint-feedback-comment:before {
    content: "\e922";
}
.rebranding-icon-comment-text:before {
    content: "\e91e";
}
.rebranding-icon-archive:before {
    content: "\e91f";
    color: #0057b8;
}
.rebranding-icon-server:before {
    content: "\e920";
    color: #0057b8;
}
.rebranding-icon-list-unordered:before {
    content: "\e921";
    color: #0057b8;
}
.rebranding-icon-folder-open:before {
    content: "\e91d";
    color: #fff;
}
.rebranding-icon-star-2:before {
    content: "\e91a";
}
.rebranding-icon-folder-1:before {
    content: "\e91b";
    color: #808080;
}
.rebranding-icon-star-yellow:before {
    content: "\e91c";
    color: #ffcd00;
}
.rebranding-icon-chevron-up:before {
    content: "\e917";
}
.rebranding-icon-chevron-down:before {
    content: "\e918";
    color: #666;
}
.rebranding-icon-chevron-right:before {
    content: "\e919";
    color: #4c4c4c;
}
.rebranding-icon-heart-red:before {
    content: "\e904";
    color: #e0004d;
}
.rebranding-icon-checkbox-rec:before {
    content: "\e905";
}
.rebranding-icon-close:before {
    content: "\e906";
}
.rebranding-icon-comment-2-info:before {
    content: "\e90a";
}
.rebranding-icon-cross:before {
    content: "\e90b";
}
.rebranding-icon-edit:before {
    content: "\e90c";
}
.rebranding-icon-email:before {
    content: "\e90d";
}
.rebranding-icon-file-download:before {
    content: "\e90e";
}
.rebranding-icon-filter:before {
    content: "\e90f";
    color: #4c4c4c;
}
.rebranding-icon-plus:before {
    content: "\e910";
}
.rebranding-icon-share:before {
    content: "\e911";
}
.rebranding-icon-shopping-cart:before {
    content: "\e912";
}
.rebranding-icon-Test-Tube:before {
    content: "\e913";
    color: #0057b8;
}
.rebranding-icon-heart:before {
    content: "\e914";
}
.rebranding-icon-trash:before {
    content: "\e915";
}
.rebranding-icon-truck:before {
    content: "\e916";
}
.rebranding-icon-truck-blue:before {
    content: "\e916";
    color: #0057b8;
}
.rebranding-icon-notification-info:before {
    content: "\e901";
    color: #0057b8;
}
.rebranding-icon-notification-success:before {
    content: "\e902";
    color: #5d9a16;
}
.rebranding-icon-notification-warning:before {
    content: "\e903";
    color: #704c06;
}
.rebranding-icon-notification-error:before {
    content: "\e900";
    color: #990035;
}

/* User CRM icon (Register) - matches old project */
.fa-user-crm:before {
    font-family: 'icomoon';
    content: "\e95f";
}

/* Sync thin icon - matches old project */
.icon-sync-thin:before {
    font-family: 'icomoon';
    content: "\e972";
    font-size: 1rem;
    font-weight: 100;
    font-style: normal;
    display: inline-block;
    width: 1em;
    height: 0.9em;
    line-height: 0.9em;
    text-align: center;
    vertical-align: baseline;
    position: relative;
    top: 0.1em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    filter: contrast(0.7);
    -webkit-text-stroke: 0.3px transparent;
}

/* Checkout icons (icomoon font) */
[class^="icon-copy-1"],
[class^="icon-trash-1"],
[class^="icon-calendar-3"],
[class^="icon-uniE921"],
[class^="icon-payment-term"],
[class^="icon-chevron-down"],
[class^="icon-check-thin"],
[class^="icon-info-icon"],
[class^="icon-maximize-3"],
[class^="icon-check-circle-2"],
[class^="icon-rebranding-list-unordered"],
[class^="icon-rebranding-box"] {
    font-family: 'icomoon' !important;
    speak: never;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.icon-copy-1:before {
    content: "\e949";
}

.icon-trash-1:before {
    content: "\e94d";
}

.icon-calendar-3:before {
    content: "\e926";
}

.icon-uniE921:before {
    content: "\e921";
}

.icon-payment-term:before {
    content: "\e998";
}

.icon-chevron-down:before {
    content: "\e980";
}

.icon-check-thin:before {
    content: "\e976";
}

.icon-info-icon:before {
    content: "\e968";
}

.icon-maximize-3:before {
    content: "\e997";
}

.icon-check-circle-2:before {
    content: "\e9aa";
}

.icon-rebranding-list-unordered:before {
    content: "\e99a";
}

.icon-rebranding-box:before {
    content: "\e999";
}

@media (max-width: 480px) {
    .icon-sync-thin:before {
        font-size: 1.125rem;
        height: 1em;
        line-height: 1em;
    }
}

.fa,
.fas,
.far,
.fab {
    font-display: swap !important;
}

/* Ensure Font Awesome icons load properly */
i[class^="fa-"],
i[class*=" fa-"] {
    font-family: "Font Awesome 7 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
}

body {
    font-family: Calibri;
    margin: 0;
    padding: 0;
    background-color: white;
    -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none !important;
}

/* Global Styles */
.container {
    max-width: 1240px;
    margin: 80px auto 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 65px;
    left: 20px;
    width: 22px;
    height: 20px;
    padding-top: 2px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: none;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: white;
    transform: none;
    box-shadow: none;
}

/* Responsive */
@media (max-width: 768px) {
    .scroll-to-top {
        width: 24px;
        height: 24px;
        bottom: 70px;
        left: 15px;
    }
}

.notifications--error {
    padding: 20px 15px;
    margin: 5px 0 10px 0;
    list-style: none;
    background-color: #f9caca;
    color: #7a0026;
}

/* Shared Backdrop/Loading Overlay */
.bridge-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.bridge-backdrop-content {
  background-color: #ffffff;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  min-width: 200px;
  transform: scale(0.9);
  transition: transform 0.3s ease-in-out;
}

.bridge-spinner {
  margin-bottom: 16px;
}

.bridge-spinner i {
  font-size: 32px;
  color: #007bff;
}

.bridge-backdrop-text {
  font-size: 16px;
  font-weight: 500;
  color: #333333;
  margin: 0;
}

/* Animation states */
.bridge-backdrop.show {
  opacity: 1;
}

.bridge-backdrop.show .bridge-backdrop-content {
  transform: scale(1);
}

.bridge-backdrop.hide {
  opacity: 0;
}

.bridge-backdrop.hide .bridge-backdrop-content {
  transform: scale(0.9);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .bridge-backdrop-content {
    padding: 30px;
    min-width: 150px;
  }

  .bridge-spinner i {
    font-size: 28px;
  }

  .bridge-backdrop-text {
    font-size: 14px;
  }
}

/* Bridge Loading Bar - top bar (same as OroPlatform vendor) - generic use */
.bridge-loading-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: #E85D04;
    box-shadow: none;
    border-radius: 3px;
    transition: width 300ms ease-out, opacity 300ms linear;
    animation: line-loader 5s forwards;
    overflow: hidden;
    z-index: 9999;
}

.bridge-loading-bar::before {
    content: '';
    background: #f09040; /* color.adjust(#E85D04, lightness: 15%) */
    width: 15%;
    height: 100%;
    position: absolute;
    box-shadow: none;
    top: 0;
    animation: line-point 800ms ease-in-out infinite;
}

.bridge-loading-bar.active {
    display: block;
}

@keyframes line-point {
    0% {
        left: 0;
        transform: translateX(-100%);
    }
    100% {
        left: 100%;
        transform: translateX(0);
    }
}

@keyframes line-loader {
    0% {
        width: 1%;
    }
    5% {
        width: 5%;
    }
    10% {
        width: 15%;
    }
    15% {
        width: 25%;
    }
    25% {
        width: 35%;
    }
    50% {
        width: 50%;
    }
    80% {
        width: 75%;
    }
    100% {
        width: 85%;
    }
}
