/* Global styles */
[v-cloak] { display: none; }

::-webkit-scrollbar {
    display: none;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    height: 100%;
    background-image: linear-gradient(to bottom right, #818181 35%, #535353);
    background-repeat: no-repeat;
    background-attachment: fixed;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

#app {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Styles for login component */
.login-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #e0e0e0;
    background-image: linear-gradient(to bottom right, #e0e0e0 70%, #adadad);
}

.login-logo {
    max-width: 300px;
    margin-bottom: 2rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 300px;
}

.login-input, .login-button {
    padding: 0.5rem;
    font-size: 1rem;
}

.login-button {
    background-color: #2daae1;
    color: white;
    border: none;
    cursor: pointer;
}

/* Styles for standby component */
.standby-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    overflow: hidden;
}

.standby-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.standby-text {
    position: absolute;
    text-align: center;
    color: white;
    z-index: 2;
    width: 100%;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.3);
}

.standby-text-h1 {
    font-size: 5em;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 
      3px 3px 0 #000,
      -1px -1px 0 #000,  
      1px -1px 0 #000,
      -1px 1px 0 #000,
      1px 1px 0 #000;
    letter-spacing: 0.05em;
}

.standby-text-p {
    font-size: 1.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

/* Styles for loading component */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading-logo {
    max-width: 300px;
    margin-bottom: 2rem;
}

.loading-bar-container {
    width: 300px;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    background-color: #2daae1;
    transition: width 0.5s ease-out;
}

.loading-text {
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Styles for flash component */
.flash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: flash-background 1.2s step-end 1 forwards;
}

.flash-screen.critical {
    --flash-color: #FF0000;
}

.flash-screen.warning {
    --flash-color: #FFA500;
}

@keyframes flash-background {
    0%, 20%, 40% { background-color: var(--flash-color); }
    10%, 30%, 50% { background-color: #808080; }
    60%, 100% { background-color: var(--flash-color); }
}

.flash-content {
    background-color: white;
    padding: 30px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    width: 100%;
    font-family: Arial, sans-serif;
    min-height: 250px;
}

.flash-alert-type {
    font-size: 2em;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    font-weight: bold;
    color: var(--flash-color);
}

.flash-alert-server {
    font-size: 2em;
    margin: 0 0 20px 0;
    color: #333;
}

.flash-alert-service {
    font-size: 1.7em;
    margin: 0 0 20px 0;
    color: #444;
}

.flash-alert-details {
    font-size: 1.2em;
    margin: 0 0 15px 0;
    color: #555;
}

.flash-alert-time {
    font-size: 1.2em;
    margin: 0;
    color: #777;
    font-style: italic;
}

/* Styles for main component */
.main-content {
    flex: 1;
    width: 90%;
    overflow: auto;
    margin: auto;
    padding: 1rem;
    padding-bottom: 70px;
}

.main-item {
    width: 98%;
    margin: 0 auto 15px;
    padding: 15px;
    font-size: 22px;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: all 0.5s;
}

.main-item > div {
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-item-type { 
    width: 10%; 
    display: flex;
    align-items: center;
}



.main-item-no-alert { width: 100%; text-align: center;}
.main-item-time { width: 7%; }
.main-item-host-name { width: 14%; font-weight: bold; }
.main-item-service-name { width: 26%; font-weight: bold; }
.main-item-downtime-end { width: 26%; font-weight: bold; }
.main-item.SERVICE.CRITICAL, .main-item.HOST.CRITICAL { background-color: #ff4136; background-image: linear-gradient(to bottom right, #ff4136 50%, #ce3028); }
.main-item.SERVICE.WARNING {   background-color: #ff851b; background-image: linear-gradient(to bottom right, #ff851b 50%, #e27617); }
.main-item.DOWNTIME { background-color: #a9a9a9; background-image: linear-gradient(to bottom right, #a9a9a9 50%, #8c8c8c); }
.main-item.SERVICE.SUCCESS {   background-color: #2ecc40; background-image: linear-gradient(to bottom right, #2ecc40 50%, #26ac35); }
.main-item.UNKNOWN {background-color: #aaaaaa; background-image: linear-gradient(to bottom right, #aaaaaa 50%, #8c8c8c); }
.main-item.ACKNOWLEDGED {background-color: #c4b196;background-image: linear-gradient(to bottom right, #c4b196 50%, #a69379); }
.main-item-reason {
    width: 53%;
    overflow: hidden;
}
@keyframes trophy-shine {
    0% { transform: rotate(-15deg) scale(1); text-shadow: 0 0 5px gold; }
    50% { transform: rotate(15deg) scale(1.2); text-shadow: 0 0 20px gold; }
    100% { transform: rotate(-15deg) scale(1); text-shadow: 0 0 5px gold; }
}

.trophy-animate {
    display: inline-block;
    animation: trophy-shine 2s ease-in-out infinite;
}

.main-item-reason-scroll-container {
    width: 100%;
    overflow: hidden;
}

.main-item-reason-scroll-text {
    white-space: nowrap;
    display: inline-block;
}

@keyframes main-item-reason-scroll-left-right {
    0%, 20% { transform: translateX(0); } /* Pause au début */
    45%, 55% { transform: translateX(var(--scroll-distance)); } /* Pause à la fin */
    80%, 100% { transform: translateX(0); } /* Retour au début et pause */
}

.main-item-reason-scrolling .main-item-reason-scroll-text {
    animation: main-item-reason-scroll-left-right 20s ease-in-out infinite;
}


.main-item.SERVICE.SUCCESS.flash-orange {
    animation: summary-flash-orange 1s linear infinite;
    background-image: none;
}
.main-item.SERVICE.CRITICAL.flash-red, .main-item.HOST.CRITICAL.flash-red {
    animation: summary-flash-red 1s linear infinite;
    background-image: none;
}
@keyframes summary-flash-orange {
    0%, 100% { background-color: #ff851b; }
    50% { background-color: #e57300; }
}

@keyframes summary-flash-red {
    0%, 100% { background-color: #ff4136; }
    50% { background-color: #c3322a; }
}


.main-collapse-enter-active,
.main-collapse-leave-active {
  transition: all 0.5s ease-in-out;
  max-height: 200px;
  overflow: hidden;
}
.main-collapse-enter,
.main-collapse-leave-to {
  max-height: 0;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top;
}
.main-collapse-enter-to,
.main-collapse-leave {
  max-height: 200px;
  opacity: 1;
  transform: scaleY(1);
}


/* Styles for status-bar component */
.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #333;
    color: white;
    padding: 10px;
    display: flex;
    align-items: center;
    height: 50px;
    z-index: 1000;
}

.status-bar-logo {
    height: 40px;
    margin-right: 80px;
}

.status-bar-group {
    display: flex;
    align-items: center;
    margin-right: 30px;
}

.status-bar-label {
    font-weight: bold;
    margin-right: 10px;
}

.status-bar-pill {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    margin-right: 5px;
    font-weight: bold;
}

.status-bar-pill.critical { background-color: #ff4136; }
.status-bar-pill.warning { background-color: #ff851b; }
.status-bar-pill.unknown { background-color: #aaaaaa; }
.status-bar-pill.ok { background-color: #2ecc40; }
.status-bar-pill.downtime { background-color: #d4c3eb }
.status-bar-pill.acknowledged { background-color: #c4b196 } 

.status-bar-icon-group {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 10px;
}

.status-bar-icon-group i {
    font-size: 18px;
    color: #ffffff;
    margin-left: 15px;
    cursor: pointer;
}

.status-bar-icon-group i:hover {
    color: #2daae1;
}

/* Styles for version-info component */
.version-info {
    position: fixed;
    right: 0;
    bottom: 0;
    color: #666;
    font-size: 12px;
    margin: 0;
    text-align: right; 
    padding-right: 4px;
    padding-bottom: 4px;
    z-index: 5000;
}

/* Transitions */
/* Transition for login component */
.login-fade-enter-active, .login-fade-leave-active {
    transition: opacity 0.5s;
}
.login-fade-enter, .login-fade-leave-to {
    opacity: 0;
}

/* Transition for standby component */
.standby-fade-enter-active, .standby-fade-leave-active {
    transition: opacity 0.5s;
}
.standby-fade-enter, .standby-fade-leave-to {
    opacity: 0;
}

/* Transition for loading component */
.loading-fade-enter-active, .loading-fade-leave-active {
    transition: opacity 0.5s;
}
.loading-fade-enter, .loading-fade-leave-to {
    opacity: 0;
}

/* Transition for flash component */
.flash-fade-enter-active, .flash-fade-leave-active {
    transition: opacity 0.5s;
}
.flash-fade-enter, .flash-fade-leave-to {
    opacity: 0;
}

/* Transition for main component (collapse) */
.main-collapse-enter-active, .main-collapse-leave-active {
    transition: all 0.5s ease-in-out;
    max-height: 200px;
    overflow: hidden;
}
.main-collapse-enter, .main-collapse-leave-to {
    max-height: 0;
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
}
.main-collapse-enter-to, .main-collapse-leave {
    max-height: 200px;
    opacity: 1;
    transform: scaleY(1);
}

/* Transition for breaking-news */

.breaking-news-banner {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    height: 100px;
    background-color: rgba(50, 50, 50, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 1000;
  }
  
  .breaking-news-content {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
  }
  
  .breaking-news-image {
    height: 100px;
    margin: 0 20px;
    flex-shrink: 0;
    z-index: 1001;
    position: relative;
  }
  
  .breaking-news-text-container {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    margin-left: 20px;
    margin-right: 20px;
  }
  
  .breaking-news-text {
    font-size: 36px;
    font-weight: bold;
    color: white;
    white-space: nowrap;
    animation: breaking-news-text-scroll-text var(--scroll-duration) linear infinite;
    display: inline-block;
  }

  @keyframes breaking-news-text-scroll-text {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
  }

  
.breaking-news-fade-enter-active, .breaking-news-fade-leave-active {
    transition: opacity 0.5s;
}
.breaking-news-fade-enter, .breaking-news-fade-leave-to {
    opacity: 0;
}

