/* ========================================
   COMPONENT STYLES
   Buttons, Cards, Forms, Badges
   ======================================== */

/* ===== BUTTONS ===== */
.btn-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-heading);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-custom:hover,
.btn-custom:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn-custom:active {
  transform: translateY(0);
}

/* Button Sizes */
.btn-custom-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-sm);
}

.btn-custom-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--fs-lg);
}

/* Button Variants */
.btn-custom-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-custom-primary:hover,
.btn-custom-primary:focus {
  background-color: var(--primary-dark);
  color: var(--white);
}

.btn-custom-secondary {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn-custom-secondary:hover,
.btn-custom-secondary:focus {
  background-color: var(--secondary-dark);
  color: var(--white);
}

.btn-custom-outline-primary {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-custom-outline-primary:hover,
.btn-custom-outline-primary:focus {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.btn-custom-outline-white {
  background-color: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-custom-outline-white:hover,
.btn-custom-outline-white:focus {
  background-color: var(--white);
  color: var(--primary-color);
  border-color: var(--white);
}

/* ===== CARDS ===== */
.card-custom {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: 1px solid var(--gray-200);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-custom:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-custom-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background-color: var(--gray-100);
}

.card-custom-body {
  padding: var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-custom-icon {
  width: 64px;
  height: 64px;
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  border-radius: var(--radius-lg);
  color: var(--white);
  font-size: var(--fs-2xl);
}

.card-custom-title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-3);
  color: var(--dark-color);
  text-align: center;
  width: 100%;
}

.card-custom-text {
  font-size: var(--fs-base);
  color: var(--medium-gray);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-4);
  flex: 1;
  text-align: center;
}

.card-custom-meta {
  font-size: var(--fs-sm);
  color: var(--light-gray);
  margin-top: auto;
  text-align: center;
}

.card-custom-footer {
  padding: var(--space-4) var(--space-6);
  /* background-color: var(--gray-100); */
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Card Variants */
.card-custom-horizontal {
  flex-direction: row;
}

.card-custom-horizontal .card-custom-image {
  width: 40%;
  height: auto;
}

@media (max-width: 767px) {
  .card-custom-horizontal {
    flex-direction: column;
  }
  
  .card-custom-horizontal .card-custom-image {
    width: 100%;
    height: 200px;
  }
}

/* ===== FORMS ===== */
.form-custom {
  width: 100%;
}

.form-custom-group {
  margin-bottom: var(--space-6);
}

.form-custom-label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: var(--fw-medium);
  color: var(--gray-800);
  font-size: var(--fs-base);
}

.form-custom-label-required::after {
  content: " *";
  color: var(--danger-color);
}

.form-custom-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--gray-800);
  background-color: var(--white);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.form-custom-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-custom-control::placeholder {
  color: var(--gray-500);
}

.form-custom-control:disabled {
  background-color: var(--gray-100);
  cursor: not-allowed;
  opacity: 0.6;
}

textarea.form-custom-control {
  resize: vertical;
  min-height: 120px;
}

.form-custom-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  background-size: 12px;
  padding-right: var(--space-10);
}

.form-custom-check {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.form-custom-check-input {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.form-custom-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-custom-feedback {
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
}

.form-custom-feedback-error {
  color: var(--danger-color);
}

.form-custom-feedback-success {
  color: var(--success-color);
}

/* ===== BADGES ===== */
.badge-custom {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-full);
}

.badge-custom-primary {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.badge-custom-success {
  background-color: #d4edda;
  color: #155724;
}

.badge-custom-info {
  background-color: #d1ecf1;
  color: #0c5460;
}

.badge-custom-warning {
  background-color: #fff3cd;
  color: #856404;
}

.badge-custom-danger {
  background-color: #f8d7da;
  color: #721c24;
}

/* ===== ALERTS ===== */
.alert-custom {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  border-left: 4px solid transparent;
}

.alert-custom-success {
  background-color: #d4edda;
  border-color: var(--success-color);
  color: #155724;
}

.alert-custom-info {
  background-color: #d1ecf1;
  border-color: var(--info-color);
  color: #0c5460;
}

.alert-custom-warning {
  background-color: #fff3cd;
  border-color: var(--warning-color);
  color: #856404;
}

.alert-custom-danger {
  background-color: #f8d7da;
  border-color: var(--danger-color);
  color: #721c24;
}

/* ===== ICON CONTAINERS ===== */
.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background-color: var(--gray-100);
  color: var(--primary-color);
  font-size: var(--fs-xl);
}

.icon-circle-lg {
  width: 64px;
  height: 64px;
  font-size: var(--fs-2xl);
}

.icon-circle-primary {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  color: var(--white);
}

.icon-circle-secondary {
  background: linear-gradient(135deg, var(--secondary-light), var(--secondary-color));
  color: var(--white);
}
