@use "sass:color";

// Main page button styles
// These are used for prominent call-to-action buttons on the main page

// Primary CTA button with gradient background
.main-page-button-primary {
  background: linear-gradient(135deg, color.adjust($primary-color, $lightness: 10%) 0%, color.adjust($primary-color, $lightness: -10%) 100%);
  color: white;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 3px 6px rgba($primary-color, 0.2);
  transition: all 0.3s ease;
  margin-right: 8px;
  text-decoration: none;
  border: none;
  display: inline-block;

  .fi-page-add {
    font-size: 14px;
    margin-right: 6px;
  }

  &:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba($primary-color, 0.3);
    color: white;
  }
}

// Secondary button style - neutral styling
.main-page-button-secondary {
  background: white;
  color: #495057;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  transition: all 0.2s ease;
  text-decoration: none;
  border: 2px solid #d1d5db;
  display: inline-block;

  .fi-magnifying-glass {
    font-size: 14px;
    margin-right: 6px;
    color: #6c757d;
  }

  &:hover {
    border-color: #9ca3af;
    color: #374151;

    .fi-magnifying-glass {
      color: #374151;
    }
  }
}

// Search field button - looks like a text input
.main-page-button-search-field {
  background: white;
  color: #495057;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  transition: all 0.2s ease;
  text-decoration: none;
  border: 2px solid #d1d5db;
  display: inline-block;
  cursor: text;
  position: relative;

  .fi-text-color {
    font-size: 14px;
    margin-right: 6px;
    color: #495057;
  }

  .search-placeholder {
    color: #495057;
    user-select: none;
  }

  &:hover {
    border-color: #9ca3af;
    background: #fafafa;
    cursor: pointer;
  }

  &:active {
    border-color: $primary-color;
    background: #f0f7ff;
  }
}

// Mobile responsive styles - add vertical spacing between buttons
@media screen and (max-width: 639px) {
  // Target elements directly in uczelnia-main-content
  .uczelnia-main-content {
    // Direct children should stack vertically
    > a.main-page-button-primary,
    > a.main-page-button-secondary,
    > a.main-page-button-search-field,
    > form {
      display: block !important;
      width: 100% !important;
      margin-right: 0 !important;
      margin-bottom: 10px !important;
    }
  }

  // Style the buttons themselves
  .main-page-button-primary,
  .main-page-button-secondary,
  .main-page-button-search-field {
    display: block !important;
    width: 100% !important;
    margin-right: 0 !important;
    text-align: center;
  }

  // Specific fix for button element with inline styles inside form
  form button.main-page-button-secondary {
    display: block !important;
    width: 100% !important;
    border: none !important;
    background: none !important;
    padding: 0 !important;

    // Target the span inside button
    span.main-page-button-secondary {
      display: block !important;
      width: 100% !important;
    }
  }
}
