/* =========================================================
   PHOCA GALLERY - MODERN WATERCOLOR THEME
   Inspired by dcwatercolor.com
   Clean, soft, and gallery-friendly design
   ========================================================= */

/* GLOBAL STYLES */
:root {
  --pg-accent: #2a73b9;
  --pg-accent-light: #5da9dd;
  --pg-highlight: #9ac8e6;
  --pg-bg: #f9fbfd;
  --pg-border: #e5e7eb;
  --pg-text: #333;
  --pg-muted: #999;
  --pg-success: #3b8d5c;
  --pg-danger: #e14d4d;
  --pg-warning: #f7c948;
  --pg-shadow: rgba(0, 0, 0, 0.15);
}

/* GENERAL RESET + BASE */
#phocagallery {
  margin-bottom: 2em;
  background: var(--pg-bg);
  font-family: "Roboto", "Open Sans", sans-serif;
  color: var(--pg-text);
}

/* Icons */
.ph-si {
  width: 1.4em;
  height: 1.4em;
  margin: 0 0.25em;
  fill: currentColor;
  vertical-align: middle;
  transition: transform 0.2s ease, color 0.3s ease;
}
.ph-si:hover {
  transform: scale(1.2);
  color: var(--pg-accent);
}

/* ICON COLORS */
.ph-si-feed { color: var(--pg-warning); }
.ph-si-image { color: #fff; }
.ph-si-tab.ph-si-image { color: var(--pg-accent); }
.ph-si-category, .ph-si-category-top-category { color: var(--pg-warning); }
.ph-si-star { color: #f4c542; }
.ph-si-comment { color: var(--pg-accent); }
.ph-si-upload, .ph-si-earth { color: var(--pg-success); }
.ph-si-upload-multiple { color: var(--pg-accent); }
.ph-si-trash { color: var(--pg-danger); }
.ph-si-enabled { color: var(--pg-success); }
.ph-si-disabled { color: var(--pg-danger); }
.ph-si-next-btn,
.ph-si-prev-btn { color: #fff; transition: all 0.3s ease; }
.ph-si-next-btn:hover,
.ph-si-prev-btn:hover { color: var(--pg-accent-light); }

/* CATEGORY & ITEM LAYOUT */
.pg-categories-items-box,
.pg-category-items-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-end;
  align-content: flex-end;
  gap: 1em;
}

@media only screen and (max-width: 768px) {
  .pg-categories-items-box,
  .pg-category-items-box {
    justify-content: center;
  }
}

/* ITEM BOXES */
.pg-item-box,
.pg-category-box {
  border: 1px solid var(--pg-border);
  margin: 0.5em;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 10px var(--pg-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pg-item-box:hover,
.pg-category-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

/* THUMBNAILS */
.pg-category-box-image svg,
.pg-detail-item-image-box img,
.pg-item-box-image img,
.pg-item-box-image svg,
.pg-category-box-image img {
  border-radius: 6px;
  width: 100%;
  height: auto;
  box-shadow: 0 4px 8px rgba(50, 50, 93, 0.25);
  transition: transform 0.5s ease;
}
.pg-item-box:hover img,
.pg-category-box:hover img {
  transform: scale(1.03);
}

/* TITLES */
.pg-item-box-title,
.pg-category-box-title {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 0.6em;
  color: #fff;
  font-weight: 600;
  width: 100%;
  border-radius: 0 0 6px 6px;
  font-size: 1.05rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
  transition: background 0.3s ease;
}

.pg-item-box-title a,
.pg-category-box-title a {
  text-decoration: none;
  color: #fff;
}

/* RATING & LABELS */
.pg-categories-box-rating,
.pg-category-box-rating {
  position: absolute;
  top: 0.6em;
  right: 0.6em;
}

.pg-category-box-label-box {
  position: absolute;
  top: 0.3em;
  left: 0.3em;
  font-weight: bold;
  color: #fff;
}

.pg-category-box-label-new {
  background: #2a73b9;
  padding: 0.2em 0.6em;
  margin: 0.2em;
  border-radius: 3px;
}
.pg-category-box-label-hot {
  background: #e14d4d;
  padding: 0.2em 0.6em;
  margin: 0.2em;
  border-radius: 3px;
}

/* COUNTS */
.pg-category-box-count {
  font-size: 0.9em;
  color: var(--pg-muted);
}

/* ICON BOX (IMAGE OVERLAY) */
.pg-item-box-icons-box {
  position: absolute;
  bottom: 3.2em;
  right: 0.3em;
  padding: 0.3em;
}

.pg-item-box-icons-box svg.ph-si {
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  padding: 0.3em;
  margin: 0;
  transition: all 0.3s ease;
}

.pg-item-box-icons-box svg.ph-si:hover {
  background: var(--pg-accent-light);
  color: #fff;
}

/* MODAL WINDOW */
#pgCategoryModal .modal-dialog {
  height: 90%;
  max-width: 70%;
}

#pgCategoryModal .modal-content {
  height: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 20px var(--pg-shadow);
}

/* PAGINATION */
.com-phocagallery .pagination,
.com_phocagallery .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
  margin-top: 1.5em;
}
.com-phocagallery .pagination li a,
.com_phocagallery .pagination li a {
  color: var(--pg-accent);
  padding: 0.5em 0.8em;
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease;
}
.com-phocagallery .pagination li a:hover {
  background: var(--pg-accent);
  color: #fff;
}

/* LOADING ANIMATION */
.ph-lds-ellipsis {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 0px;
}

.ph-loading-text {
  text-align: center;
  color: var(--pg-accent);
}
.ph-loading-text .ph-lds-ellipsis {
  height: 50px;
}

.ph-lds-ellipsis div {
  position: absolute;
  top: 33px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--pg-accent);
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.ph-lds-ellipsis div:nth-child(1) { left: 8px; animation: ph-lds-ellipsis1 0.6s infinite; }
.ph-lds-ellipsis div:nth-child(2) { left: 8px; animation: ph-lds-ellipsis2 0.6s infinite; }
.ph-lds-ellipsis div:nth-child(3) { left: 32px; animation: ph-lds-ellipsis2 0.6s infinite; }
.ph-lds-ellipsis div:nth-child(4) { left: 56px; animation: ph-lds-ellipsis3 0.6s infinite; }

@keyframes ph-lds-ellipsis1 { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes ph-lds-ellipsis3 { 0% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes ph-lds-ellipsis2 { 0% { transform: translate(0, 0); } 100% { transform: translate(24px, 0); } }

/* ADMIN LIST */
.ph-adminlist {
  clear: both;
  margin: 1em auto;
}
.ph-adminlist tr th,
.ph-adminlist tr td {
  border-collapse: collapse;
  border: 1px solid var(--pg-border);
  text-align: center;
  padding: 0.4em;
}

/* RESPONSIVE TWEAKS */
@media only screen and (max-width: 768px) {
  .pg-item-box,
  .pg-category-box {
    width: 90%;
  }
  .pg-item-box-title,
  .pg-category-box-title {
    font-size: 1rem;
  }
  .com-phocagallery form > .pagination,
  .com_phocagallery form > .pagination {
    flex-direction: column;
    align-items: center;
  }
}
