/* ============================================
   SHEET SYSTEM - Styles
   ============================================ */

/* === BASE SHEET LAYOUT === */
#bottomsheet {
  position: fixed;
  background: white;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* === TOP CONTROLS (Header) === */
.sheet-top-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--k-light, #e5e7eb);
  flex-shrink: 0;
  gap: 12px;
}

.top-controls-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}

.top-controls-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-btn {
  padding: 8px 16px;
  background: var(--bg-secondary, #f5f5f7);
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #1d1d1f);
  cursor: pointer;
  transition: all 0.2s ease;
}

.top-btn:hover {
  background: var(--bg-tertiary, #e5e5e5);
}

.top-chevron {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease;
  color: var(--text-secondary, #6e6e73);
}

.top-chevron:hover {
  background: rgba(0, 0, 0, 0.05);
}

.top-chevron svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.top-chevron.expanded svg {
  transform: rotate(180deg);
}

/* === DROPDOWN MENU === */
.top-controls-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  min-width: 200px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
}

.top-controls-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.top-controls-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.top-controls-dropdown li {
  padding: 0;
}

.top-controls-dropdown a,
.top-controls-dropdown button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  text-align: left;
  text-decoration: none;
  color: var(--text-primary, #1d1d1f);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.top-controls-dropdown a:hover,
.top-controls-dropdown button:hover {
  background: var(--bg-secondary, #f5f5f7);
}

.top-controls-dropdown a svg,
.top-controls-dropdown button svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-secondary, #6e6e73);
}

/* === DRAG HANDLE (Mobile) === */
.drag-handle {
  width: 40px;
  height: 4px;
  background: var(--gray-300, #d0d0d0);
  border-radius: 2px;
  margin: 0 auto 8px;
}

/* === CLOSE BUTTON === */
#bottomsheet .close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

#bottomsheet .close-btn:hover {
  background: var(--bg-tertiary, #f0f0f0);
}

#bottomsheet .close-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-secondary, #666);
}

/* === CONTENT AREA (Middle) === */
#sheet-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

/* === BOTTOM CONTROLS (Footer) === */
.sheet-bottom-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--k-light, #e5e7eb);
  background: white;
  flex-shrink: 0;
}

.btn-secondary {
  padding: 12px 20px;
  background: transparent;
  border: 1px solid var(--gray-300, #cfd4d8);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #1d1d1f);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--bg-secondary, #f5f5f7);
  border-color: var(--gray-400, #b0b5ba);
}

.btn-primary {
  flex: 1;
  padding: 14px 24px;
  background: var(--blue, #0071e3);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary:hover {
  background: var(--blue-hover, #0077ed);
}

.btn-more {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  font-size: 18px;
  color: var(--text-secondary, #6e6e73);
  transition: all 0.2s ease;
}

.btn-more:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* === LOADING STATE === */
.sheet-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-tertiary, #86868b);
}

.sheet-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-200, #e5e7ea);
  border-top-color: var(--blue, #0071e3);
  border-radius: 50%;
  animation: sheet-spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes sheet-spin {
  to {
    transform: rotate(360deg);
  }
}

/* === MOBILE (Bottom Sheet) === */
@media (max-width: 767px) {
  #bottomsheet {
    bottom: 0;
    left: 0;
    right: 0;
    height: 70vh;
    max-height: 90vh;
    transform: translateY(100%);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  }

  #bottomsheet.open {
    transform: translateY(0);
  }

  #bottomsheet.full {
    height: 95vh;
  }

  .drag-handle {
    display: block;
    margin-top: 1rem;
  }

  .sheet-top-controls {
    padding: 0px 16px;
    transform: translateY(-10px);
    padding-bottom: 10px;
  }

  .top-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  #sheet-content {
    padding: 16px;
  }

  .sheet-bottom-controls {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .btn-secondary {
    padding: 10px 16px;
    font-size: 13px;
  }

  .btn-primary {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    font-size: 14px;
  }

  .btn-more {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

/* === DESKTOP (Side Panel) === */
@media (min-width: 768px) {
  #bottomsheet {
    top: 0;
    right: 0;
    bottom: 0;
    width: 480px;
    max-width: 90vw;
    height: 100vh;
    transform: translateX(100%);
    border-left: 1px solid var(--k-light, #e5e7eb);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  }

  #bottomsheet.open {
    transform: translateX(0);
  }

  #bottomsheet.full {
    width: 680px;
  }

  .drag-handle {
    display: none;
  }

  .sheet-top-controls {
    padding: 5px 20px;
  }

  #sheet-content {
    padding: 24px;
  }

  .sheet-bottom-controls {
    padding: 16px 20px;
  }
}

/* === CONTACT SHEET CONTENT === */
.contact-sheet-content {
  padding: 16px;
}

.contact-cta-section {
  margin-bottom: 24px;
}

.contact-cta-section h3 {
  font-size: 14px;
  color: var(--text-secondary, #6e6e73);
  margin: 0 0 16px;
  text-align: center;
}

.contact-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-secondary, #f5f5f7);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary, #1d1d1f);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.contact-option:hover {
  background: var(--bg-tertiary, #e5e5e5);
  transform: translateX(4px);
}

.contact-option svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-primary, #1d1d1f);
  flex-shrink: 0;
}

.contact-option.phone svg {
  stroke: #0066cc;
}
.contact-option.email svg {
  stroke: #e68600;
}
.contact-option.whatsapp svg {
  stroke: #25d366;
}

.social-section {
  text-align: center;
  margin-top: 8px;
}

.social-section h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary, #86868b);
  margin: 0 0 12px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.social-links a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary, #f5f5f7);
  border-radius: 50%;
  transition: all 0.2s ease;
  color: var(--text-primary, #1d1d1f);
}

.social-links a:hover {
  background: var(--bg-tertiary, #e5e5e5);
  transform: translateY(-2px);
}

.social-links svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-primary, #1d1d1f);
}

@media (min-width: 768px) {
  .contact-sheet-content {
    padding: 24px;
  }

  .contact-cta-section h3 {
    font-size: 15px;
  }

  .contact-option {
    padding: 16px 20px;
    font-size: 15px;
  }

  .contact-option svg {
    width: 24px;
    height: 24px;
  }
}
