/* Global CSS - Consolidated from all HTML files */

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #fff;
  font-family: "Lexend", sans-serif;
}

/* ===== TYPOGRAPHY ===== */
a {
  color: inherit;
}

h1 {
  text-align: center;
  font-size: 3em;
}

h2 {
  text-align: center;
}

/* ===== LAYOUT COMPONENTS ===== */
.containner {
  max-width: 30rem;
  width: 100%;
  padding: 20px;
  margin: 0 auto;
}

.wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.head {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
}

/* ===== FORMS ===== */
form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

input[type="text"],
input[type="password"] {
  width: auto;
  padding: 10px;
  margin-bottom: 10px;
  border: 0.2em solid #a1a1a1;
  border-radius: 5px;
}

input[type="password"].error {
  border-color: #f44336;
}

select {
  width: auto;
  padding: 10px;
  border: none;
  background-color: #f1f1f1;
  border-radius: 5px;
}

.row {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

/* ===== BUTTONS ===== */
.btn {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
  border: none;
  background-color: #e1e1e1;
  color: black;
}

.btn.active {
  background-color: #2196f3;
  color: white;
}
.btn.dark {
  background-color: #000;
  color: white;
}

.btn:disabled {
  background-color: #cccccc;
}

button[type="submit"] {
  width: fit-content;
  padding: 10px 17px;
  margin-bottom: 10px;
  border-radius: 5px;
  border: none;
  background-color: #000000;
  color: white;
}

button[type="submit"]:disabled {
  background-color: #cccccc;
}

/* ===== INFO BOXES ===== */
.info-box {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 5px;
  background-color: #111;
  color: #fff;
  margin-bottom: 10px;
}

.info-box.hide {
  display: none;
}

.info-box.error {
  background-color: #f44336;
}

/* ===== LOADING ===== */
.loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.5);
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  cursor: progress;
  overflow: hidden;
}

.hide {
  display: none;
}

/* ===== NAVIGATION ===== */
nav {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 20px;
  justify-content: space-between;
  background-color: #000000;
}

nav > div {
  display: flex;
  align-items: center;
  gap: 5px;
}

nav h3 {
  color: #fff;
}

nav a {
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: #fff;
  padding: 5px 7px;
  border-radius: 5px;
  color: #000000;
}

/* ===== FILE HANDLING ===== */
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.file-item .title {
  display: flex;
  align-items: center;
  overflow: hidden;
  gap: 10px;
}

.file-item .title p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item p.delete-action {
  color: #f44336;
  cursor: pointer;
}

.file-item a {
  color: #007bff;
  cursor: pointer;
}

.file-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== DROP ZONE ===== */
.drop-zone {
  padding: 10px;
  background-color: #f1f1f1;
  border-radius: 5px;
}

.drop-zone .container {
  width: 100%;
  height: 100%;
  border: 2px dashed #000000;
  color: #000000;
  border-radius: 5px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
}

.drop-zone:active,
.drop-zone.dragover {
  background-color: #a1d5ff;
}

.upload button {
  width: 100%;
}

/* ===== TABLES ===== */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

th,
td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  white-space: nowrap;
}

th {
  background: #007bff;
  color: white;
  text-transform: uppercase;
  font-size: 16px;
}

tr:hover {
  background: #f1f1f1;
}

/* ===== LISTS ===== */
li {
  list-style: decimal;
  margin-left: 20px;
}

/* ===== LOGIN PAGE SPECIFIC ===== */
body.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

body.login-page a {
  color: currentColor;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 700px) {
  nav a p {
    display: none;
  }

  table {
    border: 0;
    box-shadow: none;
  }

  table thead {
    border: none;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }

  table tr {
    display: block;
    border-collapse: collapse;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
  }

  table td {
    display: block;
    font-size: 0.8em;
    text-align: right;
  }

  table td::before {
    content: attr(data-label);
    float: left;
    font-weight: bold;
    text-transform: uppercase;
  }

  #slide-bar {
    width: 100%;
    position: relative;
    padding: 10px;
    z-index: 99;
    position: fixed;
    top: 0;
    left: 0;
  }
}

/* ===== GALLERY PAGE SPECIFIC ===== */
.colections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
  padding: 16px;
}
.colections .colection-item .image {
  aspect-ratio: 16/9;
  background-color: #111;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.colections .colection-item .image::after {
    content: "Lihat Detail";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    color: #fff;
    transition: all 0.3s ease;
}

.colections .colection-item .image:hover::after{
    top: 0;
}

.colections .colection-item .info {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
}
.colections .colection-item p {
  display: -webkit-box;
  line-clamp: 1;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popup-detail {
  background-color: #fff;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 600px;
  padding: 20px;
  z-index: 1000;
  border-radius: 10px;
}
.popup-detail-bg {
  position: fixed;
  content: "";
  background-color: #1114;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
}
.popup-detail .image {
  aspect-ratio: 16/9;
  background-color: #111;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border-radius: 5px;
}
.popup-detail .title {
  margin: 10px 0;
}
.popup-detail .description {
  color: #333;
}
