/* Αφαίρεση του focus outline από τα pagination links */
.pager__item a:focus,
.pager__link:focus {
  outline: none;
  box-shadow: none;
}
.pager__item.is-active a:focus {
  outline: none;
  box-shadow: none;
}

*:focus {
  outline: none !important;
  box-shadow: none !important;
}

table.views-table {
  border-collapse: collapse;
  width: 100%;
}

table.views-table th {
  background: #f5f5f5;
  color: #2158A1;
  padding: 8px;
  cursor: pointer;
}

table.views-table td {
  border: 1px solid #ccc;
  padding: 6px;
  max-width: 300px;
  overflow: hidden;
}

/* ============================================
   File Field Styling - field_document_files
   ============================================ */
table.views-table td .field--name-field-document-files {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 280px;
}

table.views-table td .field--name-field-document-files .field__item {
  display: block;
}

table.views-table td .field--name-field-document-files a {
  display: inline-block;
  font-size: 0.9rem;
  color: #2158A1;
  text-decoration: none;
  word-break: break-word;
  line-height: 1.4;
}

table.views-table td .field--name-field-document-files a:hover {
  text-decoration: underline;
}

table.views-table td .field--name-field-document-files .file--mime-application-pdf:before {
  margin-right: 4px;
}

/* ============================================
   Edit Link Styling - Pencil Icon
   ============================================ */
table.views-table td a[href*="/edit"],
.views-field-edit-node a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 50%;
  text-decoration: none !important;
  font-size: 0;
  color: transparent !important;
  transition: all 0.2s ease-in-out;
}

table.views-table td a[href*="/edit"]::before,
.views-field-edit-node a::before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

table.views-table td a[href*="/edit"]:hover,
.views-field-edit-node a:hover {
  background: #f5f5f5;
  border-color: #2158A1;
}

table.views-table td a[href*="/edit"]:hover::before,
.views-field-edit-node a:hover::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232158A1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E");
}

/* ============================================
   Delete Link Styling - Trash Icon
   ============================================ */
table.views-table td a[href*="/delete"],
.views-field-delete-node a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 50%;
  text-decoration: none !important;
  font-size: 0;
  color: transparent !important;
  transition: all 0.2s ease-in-out;
  margin-left: 6px;
}

table.views-table td a[href*="/delete"]::before,
.views-field-delete-node a::before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

table.views-table td a[href*="/delete"]:hover,
.views-field-delete-node a:hover {
  background: #f5f5f5;
  border-color: #2158A1;
}

table.views-table td a[href*="/delete"]:hover::before,
.views-field-delete-node a:hover::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232158A1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E");
}

/* ============================================
   Αφαίρεση border μεταξύ edit/delete columns
   ============================================ */

table.views-table td.views-field-delete-node {
  border-left: none !important;
}

#edit-delete {
  display: none !important;
}

/* ============================================
   Zebra striping
   ============================================ */
tr:nth-child(even) {
  background-color: #f2f2f2;
}

/* ============================================
   Pager
   ============================================ */

/* Ενεργή σελίδα */
.pager__link.is-active {
  background: #1a4580;
  color: #fff;
  font-weight: 600;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease-in-out;
  pointer-events: none;
}

/* Κανονικά pager links */
.pager__link {
  color: #4a4a4a;
  font-weight: 500;
  text-decoration: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease-in-out;
}

/* Hover για αριθμητικά κουμπιά και βελάκια */
.pager__item--number .pager__link:hover:not(.is-active),
.pager__item--next .pager__link:hover,
.pager__item--previous .pager__link:hover {
  background: rgba(33, 88, 161, 0.1);
  color: #2158A1;
  box-shadow: 0 2px 6px rgba(33, 88, 161, 0.15);
  transition: all 0.3s ease-in-out;
}

/* Ενεργά (is-active) παραμένουν σταθερά */
.pager__item--number .pager__link.is-active {
  background: #1a4580;
  color: #fff;
  font-weight: 600;
  border-radius: 50%;
  pointer-events: none;
}

/* "Last" και "First" χωρίς κυκλικό hover */
.pager__item--last .pager__link:hover,
.pager__item--first .pager__link:hover {
  background: transparent;
  color: #2158A1;
  box-shadow: none;
  transform: none;
}

.pager__item--last .pager__link,
.pager__item--first .pager__link {
  font-size: 1rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.25s ease-in-out;
}

/* ============================================
   Views Exposed Form
   ============================================ */
.views-exposed-form.views-exposed-form {
  border: none;
  background: none;
  padding: 0;
  box-shadow: none;
  margin: 0 0 15px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.views-exposed-form.views-exposed-form input[type="text"] {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1.4;
  min-width: 180px;
  box-sizing: border-box;
}

/* ============================================
   Views field title link
   ============================================ */
.views-field.views-field-title a {
  color: #2158A1;
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.views-field.views-field-title a:hover,
.views-field.views-field-title a:focus {
  color: #1a4580;
  text-decoration: underline;
}

/* ============================================
   PDF file links
   ============================================ */

/* Κατάργηση του προεπιλεγμένου pdf icon */
span.file.file--mime-application-pdf.file--application-pdf {
  background: none !important;
  padding-left: 0 !important;
}

/* Στυλ για PDF links */
.file.file--mime-application-pdf.file--application-pdf a {
  color: #2158A1;
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.file.file--mime-application-pdf.file--application-pdf a:hover,
.file.file--mime-application-pdf.file--application-pdf a:focus {
  color: #1a4580;
  text-decoration: underline;
  cursor: pointer;
}

/* Νέο icon PDF */
/* Νέο icon PDF - με data URI για αξιοπιστία */
.file.file--mime-application-pdf.file--application-pdf a::before {
  content: '';
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  margin-right: 0.4em;
  vertical-align: text-bottom;
  background-image: url('/themes/custom/perifereia_ionion_theme/images/pdf.svg');
  background-repeat: no-repeat;
  background-size: contain;
}