/* Films CSV Plugin Styles */

.filmshelf-container {
  margin: 20px 0;
}

.filmshelf-controls {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.filmshelf-controls .button {
  background: #0073aa;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.filmshelf-controls .button:hover {
  background: #005a87;
}

.filmshelf-controls .button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.refresh-status {
  font-size: 14px;
  color: #666;
  font-style: italic;
}

.refresh-status.success {
  color: #46b450;
}

.refresh-status.error {
  color: #dc3232;
}

/* Table Styles */
#filmshelf-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

#filmshelf-table th {
  background-color: #f9f9f9;
  font-weight: 600;
  padding: 12px 8px;
  text-align: left;
  border-bottom: 2px solid #ddd;
}

#filmshelf-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

#filmshelf-table tbody tr:hover {
  background-color: #f5f5f5;
}

/* Error and No Data Messages */
.filmshelf-error,
.filmshelf-no-data {
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
}

.filmshelf-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.filmshelf-no-data {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #b8daff;
  text-align: center;
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #0073aa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .filmshelf-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  #filmshelf-table {
    font-size: 14px;
  }

  #filmshelf-table th,
  #filmshelf-table td {
    padding: 8px 6px;
  }
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_length select {
  padding: 4px 6px;
  margin: 0 5px;
}

.dataTables_wrapper .dataTables_filter input {
  padding: 6px 10px;
  margin-left: 8px;
}

.dataTables_wrapper .dataTables_info {
  padding-top: 15px;
  font-size: 14px;
  color: #666;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 6px 12px;
  margin-left: 2px;
  display: inline-block;
  cursor: pointer;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #f5f5f5;
  border-color: #ddd;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: #0073aa;
  color: white !important;
  border-color: #0073aa;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: #005a87;
  border-color: #005a87;
}
