/* ============================================
   MINK'A - Shared Components
   Buttons, Cards, Badges, Forms, Icons, Toggles
   ============================================ */

/* === Icons === */
.icon {
  display: inline-block;
  width: 32px;
  height: 32px;
}

.icon--inline {
  width: 20px;
  height: 20px;
  margin-left: var(--space-8);
  vertical-align: middle;
}

.logo-image {
  display: block;
  height: 48px;
  width: auto;
}

.logo-image--footer {
  height: 56px;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  padding: var(--space-12) var(--space-24);
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn i {
  margin-right: var(--space-8);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-primary:active {
  background: var(--color-primary-darker);
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: rgba(46, 204, 113, 0.1);
}

.btn-outline {
  background: transparent;
  color: var(--color-gray-700);
  border: 1.5px solid var(--color-gray-300);
}

.btn-outline:hover {
  background: var(--color-gray-50);
  border-color: var(--color-gray-400);
  color: var(--color-gray-900);
}

.btn-large {
  padding: var(--space-16) var(--space-32);
  font-size: 1.125rem;
}

.btn-small {
  padding: var(--space-8) var(--space-16);
  font-size: 0.9rem;
}

/* === Badges === */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 4px;
}

.nav-badge:empty,
.nav-badge.is-hidden {
  display: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  padding: 4px 10px;
  border-radius: var(--space-12);
  background: rgba(46, 204, 113, 0.12);
  color: var(--color-secondary-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

/* === Form Elements === */
input,
select,
textarea {
  width: 100%;
  padding: var(--space-12);
  border: 1.5px solid var(--color-gray-100);
  border-radius: var(--space-10);
  font: inherit;
  color: var(--color-gray-900);
  background: var(--color-white);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.18);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-gray-300);
}

.form__success {
  color: var(--color-primary);
  font-weight: 600;
}

.form__hint {
  font-size: 0.9rem;
  color: var(--color-gray-600);
}

/* === Toggle Switch === */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: var(--color-primary);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--color-primary);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* === Section Headers === */
.section-header {
  text-align: center;
  margin-bottom: var(--space-48);
}

.section-header__subtitle {
  font-size: 1.125rem;
  color: var(--color-gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* === Profile Card (shared between profile & landing) === */
.profile-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-50);
  border-radius: var(--space-16);
  padding: var(--space-24);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.profile-card__header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-16);
  align-items: center;
}

.profile-card__avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-12);
}

.profile-card__avatar img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.profile-card__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.profile-card__meta {
  margin: 0;
  color: var(--color-gray-600);
  font-size: 0.95rem;
}

.profile-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-secondary);
  background: var(--color-gray-50);
}

.profile-card__badge--verified {
  color: var(--color-primary);
  background: rgba(46, 204, 113, 0.12);
}

/* === Profile Progress === */
.profile-progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.profile-progress__top {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: var(--color-secondary);
}

.profile-progress__bar {
  width: 100%;
  height: 12px;
  background: var(--color-gray-50);
  border-radius: var(--space-12);
  overflow: hidden;
}

.profile-progress__fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--color-primary),
    var(--color-primary-dark)
  );
  border-radius: var(--space-12);
  transition: width 0.3s ease;
}

.profile-card__actions {
  display: flex;
  gap: var(--space-12);
  flex-wrap: wrap;
}

/* === Profile Form === */
.profile-form {
  background: var(--color-white);
  border: 1px solid var(--color-gray-50);
  border-radius: var(--space-16);
  padding: var(--space-24);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.profile-form__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-12);
  color: var(--color-gray-600);
}

/* === Identity Steps === */
.identity-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.identity-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-12);
  align-items: center;
}

.identity-step__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(46, 204, 113, 0.12);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.identity-step__title {
  margin: 0 0 4px 0;
}

.identity-step__text {
  margin: 0;
  color: var(--color-gray-600);
}

.identity-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  margin-top: var(--space-8);
}

/* === Social Login (Auth) === */
.social-login {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.1s;
  border: 1px solid transparent;
}

.btn-social:hover {
  transform: translateY(-1px);
}

.btn-google {
  background-color: white;
  color: #757575;
  border-color: #dadce0;
}

.btn-google:hover {
  background-color: #f8f9fa;
  border-color: #d2e3fc;
}

.btn-facebook {
  background-color: #1877f2;
  color: white;
}

.btn-facebook:hover {
  background-color: #166fe5;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--color-gray-600);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--color-gray-300);
}

.auth-divider span {
  padding: 0 1rem;
}

.form__checkbox a {
  color: var(--color-primary);
  text-decoration: none;
}

.form__checkbox a:hover {
  text-decoration: underline;
}

/* === Font Controls === */
.font-controls {
  display: flex;
  gap: 0.5rem;
}

/* === High Contrast Mode === */
body.high-contrast {
  --color-primary: #00ff00;
  --color-secondary: #ffffff;
  --bg-color: #000000;
  --text-color: #ffffff;
  --color-gray-600: #dddddd;
  background-color: #000000 !important;
  color: #ffffff !important;
}

body.high-contrast .settings-card,
body.high-contrast .auth-header,
body.high-contrast .card,
body.high-contrast .modal__content {
  background-color: #1a1a1a !important;
  border: 2px solid #ffffff;
  color: #ffffff !important;
}

body.high-contrast a {
  color: #ffff00 !important;
  text-decoration: underline;
}

body.high-contrast button.btn-primary {
  background-color: #000000;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-weight: bold;
}

body.high-contrast .switch .slider {
  background-color: #333;
  border: 1px solid #fff;
}

body.high-contrast input:checked + .slider {
  background-color: #00ff00;
}

/* === Low Data Mode === */
body.low-data img {
  filter: blur(2px);
  transition: none !important;
}
