/* ================================
   GROUP LIST VIEW (cards)
   ================================ */
.group-card {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin: .2rem 0 1.5rem 0;
  padding: 1.5rem;
}

.group-card .group-banner img {
  width: 100%;
  height: auto;
  border-radius: 8px 8px 0 0;
}

.group-card .group-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.group-card .group-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.75rem;
}

.group-card .group-categories {
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 0.75rem;
}

.group-card .group-contact {
  margin-bottom: 1rem;
}

.group-card .group-contact a {
  color: #0074bd;
  text-decoration: none;
}

.group-card .group-contact a:hover {
  text-decoration: underline;
}

.group-card .group-actions {
  margin-top: 1rem;
}

.group-card .group-actions a {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  background: #0074bd;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
}

.group-card .group-actions a:hover {
  background: #005a91;
}


/* ================================
   GROUP NODE PAGE (full page)
   ================================ */
.group-page {
  background: #fff;
  border-radius: 6px;
  border: 1px solid #ccc;
  padding: 2rem;
  margin: 0rem 0 2.0rem 0;
  border: 1px solid #ccc;
}

.group-page__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.group-page__meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

.group-page__content {
  margin-top: 1.5rem;
  line-height: 1.6;
}

.group-page__categories,
.group-page__contact {
  margin-top: 1rem;
  font-size: 0.95rem;
}

/****************************
  GROUPS INPUT FORM
****************************/

/* Outer wrapper for the Groups form */
.group-form-wrapper {
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f0f4ff; /* different from propositions */
  padding: 1.5rem;
  margin: 2rem 0 4rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Apply wrapper to Drupal form */
form.group-form {
  composes: group-form-wrapper; /* if using PostCSS, otherwise duplicate */
}

/* Each input/textarea group */
.group-form .form-item {
  margin-bottom: 1.25rem;
}

/* Field labels */
.group-form label {
  font-weight: 600;
  font-size: 1rem;
  color: #2a3f8d;
  margin-bottom: 0.25rem;
  display: inline-block;
}

/* Textfields, textareas, selects */
.group-form .form-text,
.group-form .form-textarea,
.group-form select,
.group-form input[type="text"],
.group-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 1rem;
  resize: none;
  box-sizing: border-box;
}

/* Submit buttons */
.group-form input[type="submit"],
.group-form .form-actions .button {
  padding: 0.65rem 1.5rem;
  background-color: #2a52be;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-right: 0.5rem;
}

.group-form input[type="submit"]:hover,
.group-form .form-actions .button:hover {
  background-color: #1f3d91;
}

/* Fix for Drupal’s resizable textareas */
.group-form textarea {
  resize: none !important;
}

/* Style the Group operations block */
#block-danland-groupoperations {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 1rem;
  margin: 1.5rem 0;
  background-color: #f0f4ff; /* optional, keeps content readable */
  box-sizing: border-box;
}

/* Force all dropbutton items to be visible inline */
.dropbutton-wrapper .dropbutton .secondary-action {
  position: relative !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.dropbutton-toggle {
  display: none !important;
}

.dropbutton {
  display: flex !important;
  gap: 10px;
}

/* Group Page containers */
.group-section-title {
  margin: 1.5rem 0 1.0rem 0;
  font-weight: 700;
  text-align: left;
  color: #222;
}

.group-section-box {
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  padding: .75rem 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* Groups List Container------------------------------------------------ */

/* Group Title */
.views-field-label {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.views-field-label .field-content {
  display: block;
}

/* Date Created */
.views-field-created {
  margin-right: 15px;
  color: #666;
  font-size: 0.9em;
}

/* Creator/User */
.views-field-uid,
.views-field-uid-1 {
  display: inline-block;
  margin-right: 15px;
  color: #666;
  font-size: 0.9em;
}

/* Group Description */
.views-field-field-group-description {
  margin: 15px 0;
  line-height: 1.6;
  color: #555;
}

.views-field-field-group-description p {
  margin: 0;
}

/* Location */
.views-field-field-group-location {
  display: inline-block;
  margin-right: 20px;
  color: #666;
  font-size: 0.95em;
}

.views-field-field-group-location:before {
  content: "📍 ";
}

/* Type */
.views-field-type {
  display: inline-block;
  margin-right: 20px;
  color: #666;
  font-size: 0.95em;
}

/* Category Badge */
.views-field-field-civic-categories {
  display: inline-block;
  margin: 10px 10px 10px 0;
}

.views-field-field-civic-categories a {
  background: #e3f2fd;
  color: #1976d2;
  padding: 4px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9em;
  transition: background 0.2s ease;
}

.views-field-field-civic-categories a:hover {
  background: #bbdefb;
}

/* Membership Policy Badge */
.views-field-field-membership-policy {
  display: inline-block;
  margin: 10px 0;
}

.views-field-field-membership-policy .field-content {
  background: #4caf50;
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 500;
}

/* Action Buttons */
.views-field-view-group,
.views-field-edit-group,
.views-field-delete-group {
  display: inline-block;
  margin-right: 10px;
  margin-top: 15px;
}

/* All Buttons - Blue Style */
.views-field-view-group a,
.views-field-edit-group a,
.views-field-delete-group a {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.2s ease;
  background: #2196f3 !important;
  color: white !important;
  border: 1px solid #2196f3 !important;
}

.views-field-view-group a:hover,
.views-field-edit-group a:hover,
.views-field-delete-group a:hover {
  background: #1976d2 !important;
  border-color: #1976d2 !important;
}

/* Hide contextual links */
.views-field-contextual-links {
  display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .contextual-region.views-row {
    padding: 15px !important;
  }
  
  .views-field-label {
    font-size: 1.3em;
  }
  
  .views-field-view-group,
  .views-field-edit-group,
  .views-field-delete-group {
    display: block;
    margin-bottom: 8px;
  }
  
  .views-field-view-group a,
  .views-field-edit-group a,
  .views-field-delete-group a {
    display: block;
    text-align: center;
  }
}

.group-card {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1em;
  margin-bottom: 1em;
  background: #fff;
}

.group-title {
  margin-top: 0;
  font-size: 1.5em;
  color: #003366;
}

.group-meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 0.5em;
}

.group-meta span {
  margin-right: 1em;
}

.group-actions {
  margin-top: 1em;
}

.group-actions a {
  margin-right: 0.5em;
  background-color: #5c9ded;
  color: white;
  padding: 0.3em 0.6em;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Group Meta with Flexbox for responsive layout */
.group-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* Left side meta info */
.group-created,
.group-creator {
  margin-right: 15px;
}

/* Right side action buttons */
.group-actions-inline {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.group-actions-inline a,
.group-actions a {
  display: inline-block;
  padding: 6px 12px;
  background: #2196f3;
  color: white !important;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.85em;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.group-actions-inline a:hover,
.group-actions a:hover {
  background: #1976d2;
}

/* Responsive: Stack on small screens */
@media (max-width: 768px) {
  .group-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .group-actions-inline {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
  
  .group-actions-inline a {
    flex: 1;
    text-align: center;
    min-width: 80px;
  }
}