/* CSS for User Profile Page "Empresas" Library */

.user-profile-panel {
  margin-bottom: 20px;
}

.user-profile-page .page-header h1 {
  margin-top: 0;
}

.user-profile-page .page-header .lead {
  font-size: 16px;
}

.user-profile-panel .panel-heading {
  background-color: #fff;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
}

.user-profile-panel .panel-title {
  font-weight: bold;
  font-size: 18px;
  margin-top: 8px;
}

.user-profile-panel .btn-edit {
  color: #006199;
  font-weight: bold;
  text-decoration: none;
  padding: 6px 0;
}

.user-profile-panel .btn-edit .glyphicon {
  margin-right: 5px;
}

.user-profile-panel .panel-body {
  padding: 0;
}

.user-profile-field-row {
  padding: 20px 0;
  border-bottom: 1px solid #f5f5f5;
}

.user-profile-field-row.last-item {
  border-bottom: none;
}

.user-profile-field-row.fallback-item {
  border-top: 1px solid #f5f5f5;
  border-bottom: none;
}

.user-profile-label {
  letter-spacing: 0.5px;
}

.user-profile-value {
  font-size: 16px;
  font-weight: 600;
}

.user-profile-value.email-value {
  margin-right: 10px;
}

.user-profile-verified-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: normal;
}

.user-profile-alert {
  background-color: #e6f0f5;
  border-color: #bce8f1;
  color: #31708f;
  display: flex;
  align-items: start;
}

.user-profile-alert .glyphicon {
  font-size: 20px;
  margin-right: 15px;
  top: 2px;
}

.user-profile-alert strong {
  display: block;
  margin-bottom: 5px;
}

.user-profile-alert .alert-text {
  font-size: 14px;
}

.empresa-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-profile-panel {
  padding: 0 15px;
}

/* Drupal Vertical Tabs & Panel Body Adaptation */

/* The outer wrapper for vertical tabs */
.field-group-tabs-wrapper .vertical-tabs {
  background-color: #ffffff;
  border: 1px solid #cdd7ea;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  overflow: hidden;
  /* Ensures rounded corners clip content */
}

/* Sidebar navigation area */
.field-group-tabs-wrapper .vertical-tabs-list {
  background-color: #f8fafc;
}

/* Content area for tabs */
.field-group-tabs-wrapper .vertical-tabs-panes {
  padding: 0;
  /* Let panel-body handle padding */
  background: white;
}

/* The panel body inside the vertical tab pane */
.field-group-tabs-wrapper .panel-body {
  padding: 1.5rem;
}

/* Ensure Form items have spacing */
.field-group-tabs-wrapper .panel-body .form-item,
.field-group-tabs-wrapper .panel-body .form-group {
  margin-bottom: 1rem;
}

.panel-body:before, .panel-body:after {
  display: none;
}

.iti.iti--allow-dropdown {
  display: block;
}

/* Two-column layout for larger screens */
@media (min-width: 768px) {
  .user-profile-panel {
    padding: 0 40px;
  }
  #edit-group-basic-information--content.panel-body, #edit-group-configuration--content .form-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 2rem;
  }
}

/* ==========================================================================
   Empresa Directory Page (/empresa)
   ========================================================================== */

/* ---------- Hero mini ---------- */
.empresas-hero {
  background: #004e78;
  padding: 48px 15px 40px;
  text-align: center;
  margin-left: -15px;
  margin-right: -15px;
}

.empresas-hero h1 {
  font-size: 34px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 24px;
  letter-spacing: -0.3px;
}

.empresas-hero .sh-accent {
  color: #34d399;
}

/* ---------- Exposed filters ---------- */
.empresas-filters {
  max-width: 650px;
  margin: 0 auto;
}

/* Reset Bootstrap form--inline wrapper */
.empresas-filters .form--inline.clearfix {
  display: flex !important;
  align-items: stretch !important;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  padding: 5px;
  float: none !important;
}

.empresas-filters .form--inline.clearfix::before,
.empresas-filters .form--inline.clearfix::after {
  display: none !important;
}

.empresas-filters .form-item,
.empresas-filters .form-actions.form-group {
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

.empresas-filters .form-item {
  flex: 1;
}

.empresas-filters .form-item label {
  display: none;
}

.empresas-filters .form-item {
  display: flex;
  align-items: center;
}

.empresas-filters .form-control,
.empresas-filters .select-wrapper {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  font-size: 14px !important;
  height: auto !important;
  box-shadow: none !important;
  color: #0f172a;
  width: 100%;
}

.empresas-filters input.form-control {
  padding: 14px 16px !important;
}

.empresas-filters .select-wrapper,
.empresas-filters select.form-control {
  padding: 14px 16px !important;
  -webkit-appearance: none;
  appearance: none;
}

.empresas-filters .select-wrapper::after {
  color: #94a3b8;
}

.empresas-filters .form-control::placeholder {
  color: #94a3b8;
}

.empresas-filters .form-item-departamento-empresa {
  border-left: 1px solid #e2e8f0;
}

.empresas-filters .form-actions.form-group {
  display: flex !important;
}

.empresas-filters .btn.form-submit {
  background: #004e78 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 12px 28px !important;
  font-size: 14px !important;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  margin: 0 !important;
}

.empresas-filters .btn.form-submit:hover {
  background: #00659b !important;
}

/* ---------- Results grid ---------- */
.empresas-results {
  padding: 40px 15px 56px;
}

.tf-companies-directory {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Card styles — shared with home page */
.tf-companies-directory .tf-company-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  color: #0f172a;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.tf-companies-directory .tf-company-card:hover {
  border-color: #00659b;
  box-shadow: 0 4px 12px rgba(0, 101, 155, 0.1);
  transform: translateY(-2px);
  text-decoration: none;
  color: #0f172a;
}

.tf-companies-directory .tf-company-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  background: #f8fafc;
  margin-bottom: 14px;
}

.tf-companies-directory .tf-company-initial {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e3f2fd;
  color: #00659b;
  font-size: 22px;
  font-weight: 700;
  border-radius: 10px;
  margin-bottom: 14px;
}

.tf-companies-directory .tf-company-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tf-company-location {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.tf-companies-directory .tf-company-count {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}

.tf-companies-directory .tf-company-cta {
  font-size: 12px;
  color: #059669;
  font-weight: 600;
}

/* ---------- Empty state ---------- */
.empresas-empty {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
  font-size: 16px;
}

/* ---------- Pager ---------- */
.empresas-pager {
  margin-top: 32px;
  text-align: center;
}

.empresas-pager .pager li > a,
.empresas-pager .pager li > span {
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  color: #475569;
  border: 1px solid #e2e8f0;
  margin: 0 2px;
}

.empresas-pager .pager li > a:hover {
  background: #00659b;
  color: #fff;
  border-color: #00659b;
}

.empresas-pager .pager .active > span {
  background: #004e78;
  color: #fff;
  border-color: #004e78;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .tf-companies-directory {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .empresas-hero {
    padding: 32px 0 28px;
  }

  .empresas-hero h1 {
    font-size: 26px;
  }

  .empresas-filters form {
    flex-direction: column;
  }

  .tf-companies-directory {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .empresas-results {
    padding: 28px 15px 40px;
  }
}

@media (max-width: 575px) {
  .tf-companies-directory {
    grid-template-columns: 1fr;
  }
}
