﻿/* ======================================================================
   style.css – Custom styles for My Packages static site
   ====================================================================== */

/* Base Styles
   ---------------------------------------------------------------------- */
body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ======================================================================
   Navigation & Header
   ---------------------------------------------------------------------- */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
}

.navbar-brand span {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link.active {
    font-weight: 700;
    color: #007bff !important;
    border-bottom: 3px solid #007bff;
}

/* Responsive navbar styles */
@media (max-width: 991px) {
    .navbar-brand span {
        font-size: 1.2rem;
    }
}

@media (max-width: 767px) {
    .navbar-brand span {
        font-size: 1rem;
    }
    .navbar-brand img {
        height: 40px;
    }
}

@media (max-width: 575px) {
    .navbar-brand span {
        font-size: 0.85rem;
    }
    .navbar-brand img {
        height: 35px;
    }
}

/* ======================================================================
   Cards (General and File Cards)
   ---------------------------------------------------------------------- */
.card {
    border: none;
    margin-bottom: 1.5rem;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: auto;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-img-top {
    width: 100%;
    object-fit: cover;
    height: auto;
    max-height: none;
    background-color: #f8f9fa;
}

.col-md-2.d-flex.align-items-stretch {
    margin-bottom: 20px;
}

.result-img {
  height: 120px;
  width: 100%;
  object-fit: cover;
}

/* Specific style for file cards (clickable) */
.file-card {
    cursor: pointer;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    transition: box-shadow 0.2s ease;
}

.file-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.file-card.selected {
  border: 2px solid #007bff;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

/* ======================================================================
   Pagination
   ---------------------------------------------------------------------- */
.pagination {
    justify-content: center;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.pagination .page-link {
    color: #007bff;
    cursor: pointer;
}

/* ======================================================================
   Footer
   ---------------------------------------------------------------------- */
.footer {
    font-size: 0.9rem;
    padding: 1rem 0;
    background-color: #f1f1f1;
    border-top: 1px solid #e9ecef;
}

/* ======================================================================
   Responsive Adjustments
   ---------------------------------------------------------------------- */
@media (max-width: 768px) {
    .card-img-top {
        min-height: auto;
        height: auto;
        max-height: none;
        object-fit: cover;
    }
    
    .col-md-2 {
        width: 50%;
    }

    #fileDetails {
        margin-top: 1.5rem;
    }
}

/* ======================================================================
   Utility Classes & Overrides
   ---------------------------------------------------------------------- */
/* Add any custom utility classes or overrides below */

.table img {
  object-fit: cover;
  border-radius: 4px;
}

/* YouTube carousel controls positioning */
.carousel-item[data-media-type="youtube"] .ratio-16x9 {
  z-index: 1;
}

/* Position all carousel controls outside content */
.carousel .carousel-control-prev {
  left: -35px;
  width: 10%;
  z-index: 2;
}

.carousel .carousel-control-next {
  right: -35px;
  width: 10%;
  z-index: 2;
}

/* Make the arrows more visible when outside of content */
.carousel .carousel-control-prev-icon,
.carousel .carousel-control-next-icon {
  filter: invert(25%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(90%) contrast(90%);
  background-size: 60%;
  background-color: transparent;
  padding: 0;
}

/* Responsive table adjustments */
@media screen and (max-width: 767px) {
  div.dataTables_wrapper div.dataTables_length,
  div.dataTables_wrapper div.dataTables_info,
  div.dataTables_wrapper div.dataTables_paginate {
    text-align: left;
    margin-top: 0.5rem;
  }
  
  /* Responsive controls for mobile */
  .carousel .carousel-control-prev,
  .carousel .carousel-control-next {
    width: 15%;
  }
  
  .carousel .carousel-control-prev {
    left: 0;
  }
  
  .carousel .carousel-control-next {
    right: 0;
  }
  
  .carousel .carousel-control-prev-icon,
  .carousel .carousel-control-next-icon {
    background-size: 50%;
  }
}

/* DataTable row hover effect */
#packagesTable tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.05);
  cursor: pointer;
}

/* Category Tree Component */
.category-tree {
  max-height: 400px;
  overflow-y: auto;
}

.category-tree ul {
  list-style: none;
  padding-left: 1rem;
  margin-bottom: 0;
}

.category-tree > ul {
  padding-left: 0;
}

.category-tree li {
  margin: 0.25rem 0;
}

.category-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.category-item:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.category-item.active {
  background-color: rgba(0, 123, 255, 0.2);
  font-weight: 500;
}

.category-toggle {
  width: 16px;
  height: 16px;
  margin-right: 5px;
  cursor: pointer;
  transition: transform 0.2s;
  text-align: center;
  line-height: 16px;
}

.category-toggle.rotated {
  transform: rotate(90deg);
}

.category-name {
  flex-grow: 1;
}

.category-count {
  font-size: 0.85rem;
  color: #6c757d;
  background-color: #e9ecef;
  border-radius: 10px;
  padding: 0.2rem 0.5rem;
  margin-left: 0.5rem;
}
