/* ==========================================================================
   BUYYOURSHARE - GENERAL COMPONENTS & DRAWERS
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover { background: var(--primary-hover); }

.btn-accent {
  background: var(--accent);
  color: white;
}

.btn-accent:hover { background: var(--accent-hover); }

.btn-secondary {
  background: white;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover { background: #f1f5f9; }

.btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.btn-danger:hover { background: #fee2e2; }

.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--radius-sm); }

/* Form Controls */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  outline: none;
  font-size: 14px;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Modals & Drawers */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: flex-end; /* Mobile bottom sheet */
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform var(--transition-base);
}

@media (min-width: 640px) {
  .modal-content {
    border-radius: var(--radius-xl);
    transform: scale(0.95);
  }
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .modal-overlay.active .modal-content {
    transform: scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
}

.btn-close {
  font-size: 24px;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}

.btn-close:hover { background: #f1f5f9; color: var(--text-main); }

/* "Il Tuo Accesso" Component Card */
.access-display-box {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 18px;
}

.access-url-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.access-instructions-text {
  background: white;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 13px;
  color: var(--text-main);
  white-space: pre-line;
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Toast Alert Notification */
.toast-msg {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #0f172a;
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  transition: transform var(--transition-base);
  pointer-events: none;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
}
