/* =============================================
   AlamatPage.css
   Digunakan oleh: AlamatPage, TambahAlamatPage, EditAlamatPage
   ============================================= */

:root {
  --adr-orange:      #ff5200;
  --adr-orange-soft: #fff5f0;
  --adr-bg:          #f5f5f5;
}

/* ── Wrapper background ── */
.adr-page-bg {
  background-color: var(--adr-bg);
  min-height: 100vh;
  padding-bottom: 2rem;
}

/* ── Mobile sub-header ── */
.adr-mobile-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: white;
  border-bottom: 1px solid #eee;
}

/* =============================================
   DAFTAR ALAMAT
   ============================================= */

.adr-list-container {
  max-width: 576px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .adr-list-container {
    max-width: 1000px;
    margin: 2rem auto;
  }
}

.adr-grid {
  display: block;
}

@media (min-width: 768px) {
  .adr-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Address card */
.adr-card {
  background: white;
  border-radius: 20px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .adr-card { margin-bottom: 0; }
  .adr-card:hover:not(.adr-card-active) {
    border-color: #ddd;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
  }
}

.adr-card-active {
  border-color: var(--adr-orange) !important;
  background: var(--adr-orange-soft) !important;
  box-shadow: 0 10px 20px rgba(255, 82, 0, 0.08) !important;
}

/* Label badges */
.adr-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.adr-badge-home   { background: #f3e5f5; color: #9c27b0; }
.adr-badge-office { background: #e3f2fd; color: #0d6efd; }
.adr-badge-main   { background: var(--adr-orange); color: white; margin-left: 5px; }

.adr-card-name   { font-size: 1rem;   font-weight: 700; color: #222; }
.adr-card-phone  { font-size: 0.85rem; color: #666; margin-bottom: 0.5rem; }
.adr-card-detail { font-size: 0.85rem; color: #444; line-height: 1.6; flex-grow: 1; }

/* Action links */
.adr-action-btn {
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: none;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: #555;
}
.adr-action-btn:hover      { background: #f0f0f0; color: #000; }
.adr-action-btn.is-edit    { color: var(--adr-orange); }
.adr-action-btn.is-delete  { color: #dc3545; }

/* Fixed bottom (list) */
.adr-list-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 1rem;
  border-top: 1px solid #eee;
  z-index: 1000;
}

@media (min-width: 768px) {
  .adr-list-bottom {
    position: static;
    background: transparent;
    border: none;
    padding: 2rem 0;
    display: flex;
    justify-content: center;
  }
  .adr-list-bottom .adr-btn-orange {
    width: 300px !important;
  }
}

/* =============================================
   SHARED: Tombol orange
   ============================================= */
.select-location {
  position: absolute;
  bottom: 20%;
  left: 0;
  z-index: 401;
  width: 100%;
 }
.btn-select-location {
  background-color: var(--adr-orange);
  color: white;
  border: 1px solid #fff; 
  border-radius: 6px;
  padding: 14px 30px; 
  font-weight: 700;
  font-size: 1rem;
  box-shadow:#bbb 0 4px 15px;
  transition: background 0.2s;
  cursor: pointer;
  display: block;
  text-align: center; 
  margin: auto; 
}
.btn-select-location:hover { background-color: #e64a00; color: white; }
.btn-select-location:disabled {
  background-color: #ccc;
  box-shadow: none;
  cursor: not-allowed;
}

.adr-btn-orange {
  background-color: var(--adr-orange);
  color: white;
  border: none;
  width: 100%;
  padding: 14px;
  border-radius:12px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(255, 82, 0, 0.15);
  transition: background 0.2s;
  cursor: pointer;
  display: inline-block;
  text-align: center;
}
.adr-btn-orange:hover { background-color: #e64a00; color: white; }
.adr-btn-orange:disabled {
  background-color: #ccc;
  box-shadow: none;
  cursor: not-allowed;
}

/* =============================================
   MODAL KONFIRMASI (shared)
   ============================================= */
.adr-modal-wrap {
  border-radius: 24px !important;
  border: none !important;
}

.adr-modal-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
}

/* =============================================
   FORM PAGE (Tambah & Edit)
   ============================================= */

/* Background page */
.adr-form-bg {
  background-color: white;
  min-height: 100vh;
  padding-bottom: 90px;
}

@media (min-width: 768px) {
  .adr-form-bg {
    background-color: var(--adr-bg);
    padding-bottom: 2rem;
  }
}

/* Container utama form */
.adr-form-wrapper {
  max-width: 576px;
  margin: 0 auto;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

@media (min-width: 768px) {
  .adr-form-wrapper {
    max-width: 100%;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Desktop card container — mobile = FLAT (no card), desktop = card */
.adr-desktop-card {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  border: none;
  height: 100%;
}

@media (min-width: 768px) {
  .adr-desktop-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #eee;
  }
}

/* Section heading row (icon + teks + border-bottom) */
.adr-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #222;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid #eee;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .adr-section-heading {
    padding: 0 0 0.75rem 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 1.25rem;
  }
}

/* Area konten dalam setiap section */
.adr-section-body {
  padding: 1rem 1rem 1.25rem;
}

@media (min-width: 768px) {
  .adr-section-body {
    padding: 0;
  }
}

/* Garis pemisah antar section (mobile only) */
.adr-section-divider {
  height: 8px;
  background-color: #f2f2f2;
  border: none;
  margin: 0;
}

@media (min-width: 768px) {
  .adr-section-divider { display: none; }
}

/* Form controls */
.adr-form-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #555;
  display: block;
  margin-bottom: 0.6rem;
}

.adr-form-control,
.adr-form-select {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  border: 1.5px solid #eee;
  font-size: 0.95rem;
  background-color: var(--adr-bg);
  transition: all 0.2s ease;
  width: 100%;
  outline: none;
  font-family: inherit;
}

.adr-form-control:focus,
.adr-form-select:focus {
  border-color: var(--adr-orange);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 82, 0, 0.1);
}

.adr-form-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Location pin point preview */
.adr-location-preview {
  background: var(--adr-bg);
  border: 1.5px dashed #ccc;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}
.adr-location-preview:active {
  background: #ebebeb;
  transform: scale(0.98);
}
.adr-location-preview.has-coords {
  border-color: var(--adr-orange);
  border-style: solid;
  background: var(--adr-orange-soft);
}

/* Fixed bottom button (form, mobile only) */
.adr-form-fixed-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 1rem;
  max-width: 576px;
  margin: 0 auto;
  border-top: 1px solid #eee;
  z-index: 1000;
}

@media (min-width: 768px) {
  .adr-form-fixed-bottom {
    position: static;
    padding: 0;
    border: none;
    background: transparent;
    margin-top: 2rem;
    max-width: 100%;
  }
}

/* Desktop submit button (inside card) */
.adr-btn-save-desktop {
  background-color: var(--adr-orange);
  color: white;
  border: none;
  padding: 12px 40px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}
.adr-btn-save-desktop:hover { background-color: #e64a00; }

/* =============================================
   MAP MODAL
   ============================================= */
.adr-map-modal-content { 
  overflow: hidden;
  border: none !important;
}
 

.adr-map-container {
  width: 100%;
  height: 93vh;
  position: relative;
  background: #e8ecf0;
}

@media (min-width: 768px) {
  .adr-map-container { height: 80vh; }
}

.adr-map-badge {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  background: rgba(0, 0, 0, 0.72);
  color: white;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.75rem;
  backdrop-filter: blur(4px);
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

.adr-center-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
  z-index: 1000;
  pointer-events: none;
  margin-top: -5px;
}
.modal-header { height: 6.5vh; }