/* This file is part of nginx-fancyindex-flat-theme.
 *
 * nginx-fancyindex-flat-theme 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 3 of the License, or (at your
 * option) any later version.
 *
 * nginx-fancyindex-flat-theme 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
 * this program. If not, see
 *
 *  http://www.gnu.org/licenses/
 *
 * Original work:
 * Copyright (C) 2018 Alexander Haase <ahaase@alexhaase.de>
 *
 * Modifications:
 * Copyright (C) 2024 Rocky Enterprise Software Foundation
 * - Added Rocky Linux branding
 * - Added system-based dark mode support
 * - Updated color scheme and typography
 * - Modified layout and spacing
 */
/* This theme heavily uses Twitter Bootstrap (v4). That means, bootstrap CSS
 * classes will be used if possible and modified or enhanced by classes defined
 * in this less file (and dependent files). However, the bootstrap sources will
 * not be used and compiled in this theme for simplicity, so one served by a
 * central CDN may be used.
 *
 * Although this code shouldn't be affected by Bootstrap's licensing and/or
 * copyright, we'd like to inform anyone, that Bootstrap is licensed under the
 * MIT license.
 *
 *   Copyright (c) 2011-2018 Twitter, Inc.
 *   Copyright (c) 2011-2018 The Bootstrap Authors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 *
 * NOTE: The following comment will be used as short version of the copyright
 *       notice above to be included in compressed files, too.
 */
/*!
 * This file is part of the nginx-fancyindex-flat-theme (licensed under the GPL
 * license) and uses Twitter Bootstrap (v4) (licensed under the MIT license).
 *
 * Copyright (C)
 *  2018 Alexander Haase <ahaase@alexhaase.de>
 *
 * See the LICENSE file for details.
 */
/* Import base styles */
/* This file is part of nginx-fancyindex-flat-theme.
 *
 * nginx-fancyindex-flat-theme 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 3 of the License, or (at your
 * option) any later version.
 *
 * nginx-fancyindex-flat-theme 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
 * this program. If not, see
 *
 *  http://www.gnu.org/licenses/
 *
 *
 * Copyright (C)
 *  2018 Alexander Haase <ahaase@alexhaase.de>
 */
/**
 * Color definitions.
 *
 * As this theme doesn't use bootstrap source files, the following color
 * definitions are required for classes setting colors for elements. If the
 * color is taken from the original Bootstrap source, the name is identical to
 * the one in Bootstrap for compatibility.
 */
/**
 * Grayscale colors.
 *
 * NOTE: Although not all colors of the grayscale palette will be used, all
 *       colors have been copied for simlicity when fixing color issues in
 *       future commits.
 */
/**
 * Colors from Google's material design.
 *
 * The application's primary color is a green-tone taken from Google's material
 * design, licensed under the MIT license.
 */
/* This file is part of nginx-fancyindex-flat-theme.
 *
 * nginx-fancyindex-flat-theme 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 3 of the License, or (at your
 * option) any later version.
 *
 * nginx-fancyindex-flat-theme 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
 * this program. If not, see
 *
 *  http://www.gnu.org/licenses/
 *
 *
 * Copyright (C)
 *  2018 Alexander Haase <ahaase@alexhaase.de>
 */
/**
 * This file configures anything related to the directory index, that is not
 * handled by the general classes, e.g. the handling of filenames.
 */
#list {
  /* Filenames and the table headings may link to the relating file or sort
     * the table. However, these links shoul NOT be highlighted. Decorations
     * will be kept enabled for underlineing the link when hovering. */
  /* The colgroup needs to be hidden to stop the default fancyindex table to
     * set the width of the columns. */
}
#list a,
#list a:hover,
#list a:focus {
  color: #000;
}
#list colgroup {
  display: none;
}
#list .filename {
  /* As the filenames could take more space than available, allow the
         * browser to break it if needed. */
  word-break: break-all;
  white-space: normal;
}
/* If the client prefers a dark color scheme, the following classes will be
 * applied to give the site a dark look and feel.
 *
 * NOTE: These classes need to be at the end of this file, as they override the
 *       default settings previously defined, if the dark color scheme is
 *       requested. */
@media (prefers-color-scheme: dark) {
  a,
  a:hover,
  a:focus {
    color: white;
  }
}
/* Base styles - Light mode by default */
body {
  background-color: #fff;
  color: #212529;
}
body .navbar {
  background-color: #fff;
  border-bottom: 1px solid #e9ecef;
}
body .navbar-brand {
  color: #212529;
}
body .navbar-brand img {
  filter: none;
}
body .breadcrumb {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
}
body .list-group-item {
  background-color: #fff;
  border-color: #e9ecef;
  color: #212529;
}
body .list-group-item:hover {
  background-color: #f8f9fa;
}
body .list-group-item a {
  color: #10b981;
  text-decoration: none;
}
body .list-group-item a:hover {
  color: #0c8a60;
}
body .footer {
  background-color: #fff;
  border-top: 1px solid #e9ecef;
  padding: 1rem 0;
}
body .footer a {
  color: #10b981;
  text-decoration: none;
}
body .footer a:hover {
  color: #0c8a60;
}
body .btn-outline-secondary {
  color: #6c757d;
  border-color: #dee2e6;
}
body .btn-outline-secondary:hover {
  background-color: #f8f9fa;
  border-color: #ced4da;
  color: #343a40;
}
/* Dark mode styles - activated by system preference */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #e2e8f0;
  }
  body .navbar {
    background-color: #121212;
    border-bottom: 1px solid #232323;
  }
  body .navbar-brand {
    color: #e2e8f0;
  }
  body .navbar-brand img {
    filter: none;
  }
  body .breadcrumb {
    background-color: #1e1e1e;
    border: 1px solid #1e1e1e;
  }
  body .list-group-item {
    background-color: #1e1e1e;
    border-color: #1e1e1e;
    color: #e2e8f0;
  }
  body .list-group-item:hover {
    background-color: #2b2b2b;
  }
  body .list-group-item a {
    color: #10b981;
  }
  body .list-group-item a:hover {
    color: #34d399;
  }
  body .footer {
    background-color: #121212;
    border-top: 1px solid #232323;
  }
  body .footer a {
    color: #10b981;
  }
  body .footer a:hover {
    color: #34d399;
  }
  body .footer .text-muted {
    color: #94a3b8 !important;
  }
  body th,
  body td {
    color: #e2e8f0 !important;
    border-color: #1e1e1e !important;
  }
  body th {
    border-bottom: 1px solid #232323;
    color: #10b981;
  }
  body th a {
    color: #10b981 !important;
  }
  body th a:hover {
    color: #34d399 !important;
  }
  body .list-group {
    border-top: 1px solid #1e1e1e;
  }
  body .list-group-item {
    border-color: #1e1e1e;
    color: #e2e8f0;
  }
  body .list-group-item > a {
    color: #e2e8f0 !important;
  }
  body .list-group-item > a:hover {
    color: #10b981 !important;
  }
  body tr {
    color: #e2e8f0;
  }
  body td a {
    color: #e2e8f0 !important;
  }
  body td a:hover {
    color: #10b981 !important;
  }
}

/* =========================================================================
 * BaldwinIT Services Dashboard
 * ========================================================================= */
.page-title {
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.25rem;
}
.page-subtitle {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.services-dashboard {
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
}
.services-dashboard .section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #212529;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
}
.service-links,
.host-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.service-links .svc-card {
  flex: 1 1 220px;
  max-width: 320px;
}
.host-cards {
  margin-top: 1rem;
}
.host-cards .svc-card {
  flex: 1 1 230px;
}
.svc-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: #212529;
  transition: all 0.25s ease;
  min-width: 0;
}
.svc-card:hover {
  border-color: #994d00;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  text-decoration: none;
  color: #212529;
}
.svc-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(153, 77, 0, 0.1);
  color: #994d00;
  font-size: 1.1rem;
}
.svc-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.svc-desc {
  font-size: 0.78rem;
  color: #6c757d;
}
.svc-body {
  min-width: 0;
}
.svc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.35rem;
}
.svc-ip {
  font-family: 'Consolas', monospace;
  font-size: 0.78rem;
  color: #6c757d;
}
.svc-type {
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  color: #994d00;
}
.hosts-toggle-row {
  margin-top: 1.25rem;
}
.toggle-hosts-btn {
  background: #994d00;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease;
}
.toggle-hosts-btn:hover {
  background: #ba3e00;
}
.toggle-hosts-btn.active {
  background: #004600;
}
@media (max-width: 600px) {
  .service-links .svc-card,
  .host-cards .svc-card {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* Dark mode dashboard */
@media (prefers-color-scheme: dark) {
  .page-title {
    color: #e2e8f0;
  }
  .page-subtitle {
    color: #94a3b8;
  }
  .services-dashboard {
    background: #121212;
    border-top: 1px solid #232323;
  }
  .services-dashboard .section-title {
    color: #e2e8f0;
  }
  .svc-card {
    background: #1e1e1e;
    border-color: #2b2b2b;
    color: #e2e8f0;
  }
  .svc-card:hover {
    color: #e2e8f0;
    border-color: #994d00;
  }
  .svc-desc,
  .svc-ip {
    color: #94a3b8;
  }
  .svc-icon {
    background: rgba(153, 77, 0, 0.18);
  }
}
