/* Unified Button Styles for Bond Tree
 * This stylesheet provides consistent button styling across the application
 */

/* ===== Layout & iOS Fix ===== */
body {
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100); /* Fix for iOS Safari 100vh issue */
}

/* Fix for iOS Safari 100vh issue */
.modal-overlay, 
.note-modal, 
.friend-note-modal {
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
}

/* ===== Base Button Styles ===== */
button,
.btn {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  background-color: #4a90e2;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Button States */
button:hover,
.btn:hover {
  background-color: #3a7bc8;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:active,
button:focus,
.btn:active,
.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

button:disabled,
.btn:disabled {
  background-color: #a9c7e8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.7;
}

/* ===== Button Sizes ===== */
.btn-lg {
  padding: 14px 24px;
  font-size: 1rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}

.btn-block {
  display: inline-flex;
  margin: 0 auto;
  max-width: 200px;
}

/* ===== Button Color Variations ===== */
.btn-primary {
  background-color: #4a90e2;
}

.btn-success {
  background-color: #05a268;
}

.btn-success:hover {
  background-color: #048b5a;
}

.btn-warning {
  background-color: #ffc107;
  color: #333;
}

.btn-warning:hover {
  background-color: #e0a800;
}

.btn-danger {
  background-color: #f44336;
  color: white;
}

.btn-danger:hover {
  background-color: #d32f2f;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-light {
  background-color: #f5f5f7;
  color: #333;
  border: 1px solid #ddd;
}

.btn-light:hover {
  background-color: #e8e8ea;
}

/* ===== Icon Buttons ===== */
.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
}

.btn-icon-lg {
  width: 48px;
  height: 48px;
}

/* ===== Navigation Buttons ===== */
.back-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  background-color: #f0f0f0;
  color: #333;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 10;
  padding: 0;
}

.back-btn:hover {
  background-color: #e0e0e0;
  transform: translateY(-2px);
}

/* ===== Dashboard Buttons ===== */
.dashboard-btn {
  background-color: white;
  color: #333;
  border-radius: 16px;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-height: 120px;
  gap: 10px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transform: none;
}

.dashboard-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Dashboard Button Variants */
.dashboard-btn.mood {
  background-color: #e8f5e9;
  color: #05a268;
  border-left: 4px solid #05a268;
}

.dashboard-btn.friend {
  background-color: #e3f2fd;
  color: #4a90e2;
  border-left: 4px solid #4a90e2;
}

.dashboard-btn.request {
  background-color: #fff8e1;
  color: #ffa000;
  border-left: 4px solid #ffc107;
}

.dashboard-btn.view {
  background-color: #f3e5f5;
  color: #9c27b0;
  border-left: 4px solid #9c27b0;
}

.dashboard-btn.journal {
  background-color: #f4f3f3;
  color: #333;
  border-left: 4px solid #333;
}

.dashboard-btn.logout {
  background-color: #f44336;
  color: white;
  border: none;
  padding: 12px 24px;
  min-height: auto;
  flex-direction: row;
}

.dashboard-btn.logout:hover {
  background-color: #d32f2f;
}

/* ===== Modal Buttons ===== */
.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #777;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0;
  box-shadow: none;
}

.modal-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #333;
  transform: none;
}

/* ===== Friend Management Buttons ===== */
.friend-request-actions button {
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.accept-request {
  background-color: #4CAF50;
}

.accept-request:hover {
  background-color: #43A047;
}

.reject-request {
  background-color: #f44336;
}

.reject-request:hover {
  background-color: #E53935;
}

.delete-friend-btn {
  background-color: #f44336;
  padding: 8px 15px;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-top: 10px;
}

.delete-friend-btn:hover {
  background-color: #d32f2f;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 480px) {
  button,
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .btn-block {
    width: 100%;
    max-width: none;
  }
  
  .dashboard-btn {
    min-height: 100px;
  }
}