/* ================================================
   Clubs & Events List Page Styles
   ================================================ */

.item-list {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  width: 100%;
}

@media (min-width: 640px) {
  .item-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .item-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (min-width: 1024px) {
  .item-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

.item-card {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.item-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.item-card-header {
  background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
  color: white;
  padding: 15px;
}

.item-card-header h3 {
  margin: 0;
  color: white;
  font-size: 1.3rem;
}

.item-card-body {
  padding: 15px;
}

.item-card-body p {
  margin-bottom: 10px;
  color: #666;
}

.item-card-footer {
  padding: 10px 15px;
  background-color: #f9f9f9;
  text-align: right;
  border-top: 1px solid #ddd;
}

.item-card-footer a {
  color: #0066cc;
  text-decoration: none;
  margin-left: 10px;
}

.item-card-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .item-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 480px) {
  .item-list {
    grid-template-columns: 1fr;
  }

  .item-card-header h3 {
    font-size: 1.1rem;
  }
}

/* ================================================
   Club Detail View - Members List
   ================================================ */

.club-detail-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}

.club-header {
  padding: 40px 30px;
  text-align: center;
  color: #ffffff;
}

.club-icon-large {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #ffffff;
}

.club-icon-large img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.club-header h1 {
  color: #ffffff;
  margin-bottom: 15px;
  font-size: 2rem;
}

.club-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.club-badges .badge-light {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.club-body {
  padding: 30px;
}

.club-section {
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid #eee;
}

.club-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.club-section h3 {
  color: #0066cc;
  font-size: 1.1rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.club-description {
  color: #555;
  line-height: 1.7;
}

/* Members List */
.members-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.member-item:hover {
  background: #f0f4f8;
  transform: translateX(3px);
}

.member-avatar {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #0066cc, #4cc9f0);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.member-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.member-name {
  font-weight: 500;
  color: #333;
  font-size: 0.95rem;
}

.member-role {
  font-size: 0.8rem;
  color: #0066cc;
  background: #e8f4fc;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

/* Events List in Club View */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-link {
  text-decoration: none;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  background: #f8fafc;
  border-radius: 8px;
  transition: all 0.2s ease;
  border-left: 3px solid #0066cc;
}

.event-item:hover {
  background: #e8f4fc;
}

.event-date {
  font-size: 0.85rem;
  color: #666;
  background: #fff;
  padding: 4px 10px;
  border-radius: 5px;
  font-weight: 500;
}

.event-title {
  color: #333;
  font-weight: 500;
}

.club-remarks {
  background: #fff8e5;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #ffc107;
  color: #665500;
}

.club-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
  .club-header {
    padding: 30px 20px;
  }

  .club-header h1 {
    font-size: 1.5rem;
  }

  .club-body {
    padding: 20px;
  }

  .members-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .club-actions {
    flex-direction: column;
  }

  .club-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .club-icon-large {
    width: 80px;
    height: 80px;
  }

  .club-icon-large i {
    font-size: 2rem;
  }

  .club-icon-large img {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 480px) {
  .club-header {
    padding: 25px 15px;
  }

  .club-header h1 {
    font-size: 1.3rem;
  }

  .club-body {
    padding: 15px;
  }

  .club-badges {
    gap: 8px;
  }

  .club-badges .badge-light {
    padding: 5px 10px;
    font-size: 0.8rem;
  }

  .member-item {
    padding: 10px;
    gap: 10px;
  }

  .member-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.75rem;
  }

  .member-name {
    font-size: 0.9rem;
  }
}

/* ================================================
   Club Create/Edit Form Styles
   ================================================ */

/* Member Search Autocomplete */
.member-search-container {
  flex: 2;
  position: relative;
}

.autocomplete-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: var(--z-dropdown, 50);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background 0.2s;
}

.suggestion-item:hover {
  background: #f0f7ff;
}

.suggestion-item .suggestion-name {
  font-weight: 500;
}

.suggestion-item .suggestion-name i {
  color: #3498db;
  margin-right: 8px;
}

.suggestion-item .suggestion-details {
  color: #666;
  margin-left: 24px;
  font-size: 0.85em;
}

.no-results {
  padding: 10px;
  color: #666;
}

/* Member Add Row */
.member-add-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  align-items: flex-start;
}

.role-select-container {
  flex: 1;
}

.role-select {
  width: 100%;
}

/* Member Form Row */
.member-form-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid #e9ecef;
}

.member-form-row .member-avatar {
  width: 45px;
  height: 45px;
  min-width: 45px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.member-form-row .member-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.member-form-row .member-details .member-name {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.member-form-row .member-details small {
  display: block;
  color: #666;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-role-badge {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  background: #3498db;
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.btn-remove-member {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e74c3c;
  color: white;
  border: none;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
}

.btn-remove-member:hover {
  background: #c0392b;
  transform: scale(1.05);
}

.btn-add-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Logo Upload */
.logo-upload-container {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.logo-preview {
  width: 120px;
  height: 120px;
  border: 3px dashed #d1d5db;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  overflow: hidden;
  flex-shrink: 0;
  transition: all 0.3s;
}

.logo-preview:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.logo-preview.has-image {
  border-style: solid;
  border-color: #3b82f6;
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-preview .placeholder-icon {
  color: #9ca3af;
  font-size: 2.5rem;
}

.logo-upload-info {
  flex: 1;
}

.logo-upload-info label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
}

.logo-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.logo-upload-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-1px);
}

.logo-upload-btn input[type="file"] {
  display: none;
}

.logo-hints {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #6b7280;
}

.logo-hints li {
  margin-bottom: 4px;
}

.remove-logo-btn {
  display: none;
  margin-top: 10px;
  padding: 6px 12px;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.remove-logo-btn:hover {
  background: #fecaca;
}

.remove-logo-btn.visible {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ================================================
   Club Edit Form Styles
   ================================================ */

.edit-container {
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin: 0 auto;
}

.edit-container .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.edit-container .form-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.edit-container .form-actions .btn {
  flex: 1;
}

.warning-box {
  background-color: #ffe6e6;
  border-left: 4px solid #dc3545;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.warning-box h5 {
  margin: 0 0 10px 0;
  color: #721c24;
}

.warning-box p {
  margin: 0;
  color: #721c24;
  font-size: 14px;
}

@media (max-width: 768px) {
  .edit-container .form-row {
    grid-template-columns: 1fr;
  }

  .edit-container .form-actions {
    flex-direction: column;
  }

  .edit-container {
    padding: 20px;
  }
}

/* ================================================
   My Clubs Page Styles
   ================================================ */

.club-status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

.status-approved {
  background-color: #d4edda;
  color: #155724;
}

.status-rejected {
  background-color: #f8d7da;
  color: #721c24;
}

.club-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.club-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.club-card .club-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 15px;
}

.club-title {
  flex: 1;
}

.club-title h3 {
  margin: 0 0 5px 0;
  color: #333;
  font-size: 18px;
}

.club-type {
  color: #666;
  font-size: 14px;
}

.club-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #666;
  font-size: 14px;
}

.meta-icon {
  color: #007bff;
}

.club-card .club-description {
  color: #555;
  line-height: 1.6;
  margin-bottom: 15px;
  padding: 10px;
  background-color: #f9f9f9;
  border-left: 3px solid #007bff;
  border-radius: 4px;
}

.club-card .club-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.refusal-reason {
  background-color: #ffe6e6;
  border-left: 4px solid #dc3545;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 15px;
}

.refusal-reason h5 {
  margin: 0 0 8px 0;
  color: #721c24;
  font-size: 14px;
}

.refusal-reason p {
  margin: 0;
  color: #721c24;
  font-size: 14px;
}

.btn-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 768px) {
  .club-card .club-header {
    flex-direction: column;
  }

  .club-meta {
    flex-direction: column;
    gap: 10px;
  }

  .club-card .club-actions {
    flex-direction: column;
  }

  .club-card .club-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .clubs-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .club-card {
    padding: 15px;
  }

  .club-detail-header {
    padding: 15px;
  }

  .club-detail-header h1 {
    font-size: 1.3rem;
  }

  .member-search-form {
    flex-direction: column;
  }

  .member-search-form .btn {
    width: 100%;
  }
}

/* ================================================
   Club List Filters Row
   ================================================ */
.filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  border: none;
  background: transparent;
  padding: 0;
}

.filters-row .filter-item {
  min-width: 150px;
}

.filters-row .filter-item.filter-item-search {
  flex: 2;
  min-width: 200px;
}

.filters-row .filter-item.filter-item-select {
  flex: 1;
  min-width: 150px;
}

.filters-row .filter-item.filter-item-action {
  flex: 0 0 auto;
}

.filters-row .filter-item label {
  margin-bottom: 8px;
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--color-gray-700, #334155);
}

.filters-row .filter-input,
.filters-row .filter-select {
  border: 1px solid var(--color-gray-200, #e2e8f0);
  background: var(--color-gray-50, #f8fafc);
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-md, 8px);
  font-size: 0.875rem;
  color: var(--color-gray-800, #1e293b);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.filters-row .filter-input:focus,
.filters-row .filter-select:focus {
  outline: none;
  border-color: var(--color-primary, #0066cc);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.filter-reset-btn {
  border: none;
  background: var(--color-gray-100, #f1f5f9);
  color: var(--color-gray-500, #64748b);
  font-weight: 600;
  height: 42px;
  padding: 0 20px;
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.filter-reset-btn:hover {
  background: var(--color-gray-200, #e2e8f0);
  color: var(--color-gray-700, #334155);
}

/* Clubs Table Column Widths */
.clubs-table th:nth-child(1) {
  width: 35%;
}
.clubs-table th:nth-child(2) {
  width: 25%;
}
.clubs-table th:nth-child(3) {
  width: 15%;
}
.clubs-table th:nth-child(4) {
  width: 25%;
}

/* Action Button: Export Variant */
.action-btn.export {
  background: var(--color-gray-50, #f8fafc);
  color: var(--color-gray-600, #475569);
  border: 1px solid var(--color-gray-200, #e2e8f0);
}

.action-btn.export:hover {
  background: var(--color-info, #17a2b8);
  color: white;
  border-color: var(--color-info, #17a2b8);
}

/* Inline forms in table action cells */
.actions-cell form {
  display: inline-flex;
  margin: 0;
}

/* Club card inline forms */
.club-card .club-actions form {
  display: inline-flex;
}

@media (max-width: 768px) {
  .filters-row {
    flex-direction: column;
    gap: 12px;
  }

  .filters-row .filter-item {
    width: 100%;
    min-width: 0;
  }
}
