/**
 * TASMAC Near Me
 * Component styles
 */

/* --------------------------------------------------
 * Buttons
 * -------------------------------------------------- */

.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 44px;
  padding: 10px 20px;

  border: 1px solid transparent;
  border-radius: var(--radius-md);

  background: var(--tasmac-red);
  color: var(--white);

  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;

  text-align: center;
  text-decoration: none;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.button:hover,
.btn:hover {
  background: var(--tasmac-red-dark);
  color: var(--white);
  text-decoration: none;
}

.button:active,
.btn:active {
  transform: translateY(1px);
}

/* Secondary button */

.button--secondary,
.btn--secondary {
  background: var(--white);
  border-color: var(--tasmac-red);
  color: var(--tasmac-red);
}

.button--secondary:hover,
.btn--secondary:hover {
  background: var(--tasmac-red-light);
  color: var(--tasmac-red-dark);
}

/* --------------------------------------------------
 * Cards
 * -------------------------------------------------- */

.card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card__content {
  padding: 20px;
}

.card__title {
  margin-bottom: 8px;
  font-size: 20px;
}

.card__text {
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* --------------------------------------------------
 * Form elements
 * -------------------------------------------------- */

.form-item {
  margin-bottom: 16px;
}

.form-item label {
  display: block;
  margin-bottom: 6px;

  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.form-text,
.form-email,
.form-search,
.form-select,
.form-tel,
.form-number,
.form-url,
select,
input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="url"] {
  width: 100%;
  min-height: 46px;

  padding: 10px 14px;

  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);

  background: var(--white);
  color: var(--text-primary);

  font-size: 15px;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-text:focus,
.form-email:focus,
.form-search:focus,
.form-select:focus,
.form-tel:focus,
.form-number:focus,
.form-url:focus,
select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="url"]:focus {
  border-color: var(--tasmac-red);
  box-shadow: 0 0 0 3px var(--tasmac-red-light);
  outline: none;
}

/* --------------------------------------------------
 * Search box
 * -------------------------------------------------- */

.search-box {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.search-box input {
  flex: 1;
  min-width: 0;

  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.search-box .button,
.search-box .btn {
  flex: 0 0 auto;

  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* --------------------------------------------------
 * Badge
 * -------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;

  padding: 4px 10px;

  border-radius: 999px;

  background: var(--tasmac-red-light);
  color: var(--tasmac-red);

  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

/* --------------------------------------------------
 * Divider
 * -------------------------------------------------- */

.divider {
  width: 100%;
  height: 1px;

  margin: 24px 0;

  background: var(--border-color);
}

/* --------------------------------------------------
 * Alerts
 * -------------------------------------------------- */

.alert {
  padding: 14px 16px;

  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);

  font-size: 14px;
}

.alert--info {
  background: #f5f8ff;
}

.alert--success {
  background: #f2faf4;
}

.alert--warning {
  background: #fff9ed;
}

.alert--error {
  background: #fff2f2;
}

/* --------------------------------------------------
 * Drupal messages
 * -------------------------------------------------- */

.messages {
  border-radius: var(--radius-md);
}

/* --------------------------------------------------
 * Empty state
 * -------------------------------------------------- */

.empty-state {
  padding: 48px 24px;

  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);

  background: var(--background-light);

  text-align: center;
}

.empty-state__title {
  margin-bottom: 8px;
}

.empty-state__text {
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* --------------------------------------------------
 * Mobile
 * -------------------------------------------------- */

@media (max-width: 480px) {
  .search-box {
    flex-direction: column;
    gap: 10px;
  }

  .search-box input,
  .search-box .button,
  .search-box .btn {
    width: 100%;
    border-radius: var(--radius-md);
  }

  .card__content {
    padding: 16px;
  }
}