[data-component="visibility-settings"] {
  overflow: hidden;
  height: 18px;
}

@media only screen and (min-width: 992px) {
  [data-component="visibility-settings"] {
    overflow: initial;
    height: auto;
  }
}

[data-component="visibility-settings"].is-open {
  height: auto;
}

[data-component="visibility-settings"] h4 {
  border-bottom: 1px solid #ced4da;
  margin: 0 -13px 13px;
  padding: 0 13px 13px;
  cursor: pointer;
}

[data-component="visibility-settings"] h4 button {
  display: none;
}

@media only screen and (max-width: 991px) {
  [data-component="visibility-settings"] h4:hover {
    opacity: 0.5;
  }

  [data-component="visibility-settings"] h4 button {
    display: inline-block;
    position: absolute;
    width: 20px;
    right: 13px;
    background-color: transparent;
    border: none;
    color: #fff;
    padding: 0;
  }

  [data-component="visibility-settings"] h4 button.is-open {
    background-color: transparent;
    transform: scale(1, -1);
  }
}

/* Panel Styles */
.visibility-settings-panel {
  background: rgba(233, 233, 233, 0.98);
  padding: 16px 0;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Styles */
.visibility-section {
  margin-bottom: 20px;
}

.visibility-section:last-of-type {
  margin-bottom: 16px;
}

.visibility-section h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: #166f8f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.visibility-description {
  margin: 0 0 12px 0;
  font-size: 12px;
  color: #666;
  font-style: italic;
}

/* Radio Button Options */
.visibility-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.visibility-option {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  padding: 10px 12px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.visibility-option:hover {
  background: #f9f9f9;
  border-color: #166f8f;
}

.visibility-option input[type="radio"] {
  margin-right: 12px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #166f8f;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.visibility-option input[type="radio"]:checked {
  background: #166f8f;
}

.option-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.option-label strong {
  font-size: 12px;
  color: #272727;
  font-family: 'Athelas Bold', sans-serif;
}

.option-label small {
  font-size: 11px;
  color: #888;
  line-height: 1.3;
}

/* Actions */
.visibility-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  border-top: 1px solid #ddd;
}

.save-btn {
  flex: 1;
  padding: 8px 12px;
  background: #166f8f;
  border: 1px solid #166f8f;
  border-radius: 4px;
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.save-btn:hover {
  background: #0d5270;
  border-color: #0d5270;
  box-shadow: 0 2px 4px rgba(22, 111, 143, 0.3);
}

.save-btn i {
  font-size: 14px;
}

.reset-btn {
  flex: 1;
  padding: 8px 12px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #666;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.reset-btn:hover {
  background: #efefef;
  border-color: #999;
  color: #333;
}

.reset-btn i {
  font-size: 14px;
}

/* Save Confirmation */
.visibility-confirmation {
  padding: 8px 16px;
  margin-top: 8px;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  color: #155724;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.3s ease-out;
}

.visibility-confirmation i {
  font-size: 14px;
}

/* Summary Display */
.visibility-summary {
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.visibility-summary span {
  padding: 2px 4px;
  font-size: 11px;
}

/* Responsive Design */
@media (max-width: 480px) {
  [data-component="visibility-settings"] h4 {
    font-size: 12px;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .visibility-settings-panel {
    background: rgba(40, 40, 40, 0.98);
  }

  .visibility-option {
    background: #1a1a1a;
    border-color: #333;
    color: #e0e0e0;
  }

  .visibility-option:hover {
    background: #222;
    border-color: #166f8f;
  }

  .option-label strong {
    color: #e0e0e0;
  }

  .option-label small {
    color: #999;
  }

  .visibility-description {
    color: #999;
  }

  .reset-btn {
    background: #1a1a1a;
    border-color: #333;
    color: #aaa;
  }

  .reset-btn:hover {
    background: #222;
    border-color: #666;
    color: #ddd;
  }

  .save-btn {
    background: #0d5270;
    border-color: #0d5270;
    color: #fff;
  }

  .save-btn:hover {
    background: #084060;
    border-color: #084060;
    box-shadow: 0 2px 4px rgba(13, 82, 112, 0.3);
  }

  .visibility-confirmation {
    background: #1b4620;
    border-color: #2d5a2f;
    color: #90ee90;
  }
}
