/*!
 * -------------------------------------------------------------------------
 * News plugin for GLPI
 * -------------------------------------------------------------------------
 *
 * LICENSE
 *
 * This file is part of News.
 *
 * News is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * News is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with News. If not, see <http://www.gnu.org/licenses/>.
 * -------------------------------------------------------------------------
 * @copyright Copyright (C) 2015-2023 by News plugin team.
 * @license   GPLv2 https://www.gnu.org/licenses/gpl-2.0.html
 * @link      https://github.com/pluginsGLPI/news
 * -------------------------------------------------------------------------
 */

.plugin_news_alert-container {
   margin-bottom: 1rem;
}

/* Needed to have similar height for alerts on the same row */
.plugin_news_alert-container .alert {
   height: 100%;
}

/* No padding for last <p> in alert content, to avoid excessive bottom padding */
.plugin_news_alert-content p:last-child {
   margin-bottom: 0;
}

.plugin_news_alert {
   margin: 10px auto;
   border: none;
   position: relative;
}

.plugin_news_alert h3 {
    position: relative;
}

.plugin_news_alert-login {
   margin-bottom: 40px;
}

.plugin_news_alert-login .plugin_news_alert-content {
   max-height: 0;
   padding: 0 15px;
   overflow: hidden;
   transition: max-height .25s ease-out, padding .25s ease-out;
}

.plugin_news_alert-login .expanded .plugin_news_alert-content {
   padding: 5px 15px;
   max-height: 100%;
   overflow-y: auto;
   transition: max-height .25s ease-in, padding .25s ease-in;
}

.plugin_news_alert-login .plugin_news_alert {
   min-width: 50%;
}

.page-anonymous .row.justify-content-center {
   align-items: flex-start;
}

.page-anonymous .plugin_news_alert-login {
   width: 22rem;
   max-width: calc(100vw - 2rem);
   margin-bottom: 0;
   text-align: left;
}

.page-anonymous .plugin_news_alert-login .alert {
   border: 1px solid rgb(32 107 196 / 18%);
   border-radius: .55rem;
   box-shadow: 0 8px 24px rgb(15 23 42 / 8%);
   padding: .7rem .8rem;
}

@media (min-width: 768px) {
   .page-anonymous .plugin_news_alert-login {
      margin-top: 4.75rem;
   }
}

.page-anonymous .plugin_news_alert-login .plugin_news_alert {
   margin: 0;
   min-width: 100%;
}

.page-anonymous .plugin_news_alert-login .plugin_news_alert h3 {
   margin: 0 0 .7rem;
   padding-left: .1rem;
   padding-right: 1.5rem;
   font-size: 1.15rem;
   font-weight: 600;
   letter-spacing: .01em;
}

.plugin_news_alert .alert .d-flex > i[class*="ti-"] {
   flex-shrink: 0;
   line-height: 1;
}

.page-anonymous .plugin_news_alert-login .plugin_news_alert-content {
   margin-top: .4rem;
   line-height: 1.45;
   overflow-wrap: anywhere;
}

.page-anonymous .plugin_news_alert-login .plugin_news_alert-content p {
   margin-bottom: .55rem;
}

.page-anonymous .plugin_news_alert-login .btn-close {
   top: .45rem;
   right: .45rem;
   opacity: .55;
}

.page-anonymous .plugin_news_alert-login .btn-close:hover {
   opacity: .85;
}

.plugin_news_alert-toggle {
   background-image: url("../pics/toggle_down.png");
   background-repeat: no-repeat;
   background-size: contain;
   width: 16px;
   height: 16px;
   cursor: pointer;
   position: absolute;
   top: 50%;
   right: 0;
   transform: translateY(-50%);
   opacity: .5;
}

.expanded .plugin_news_alert-toggle {
   background-image: url("../pics/toggle_up.png");
}

.plugin_news_alert-visibility {
   margin: 0 auto;
}

.plugin_news_alert-container:empty {
   display: none;
}
