/* ==========================================================================
   Glossier Account Stylesheet — 1:1 Pixel-Perfect Glossier Customer Account
   ========================================================================== */

.glossier-account-area {
  font-family: Apercu, "Gill Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #000000;
  background-color: #ffffff;
  padding-top: calc(var(--gl-promo-height, 32px) + var(--gl-header-height, 40px) + 32px);
  padding-bottom: 96px;
  min-height: calc(100vh - 200px);
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .glossier-account-area {
    padding-top: calc(var(--gl-promo-height, 24px) + var(--gl-header-height, 40px) + 20px);
    padding-bottom: 60px;
  }
}

/* --------------------------------------------------------------------------
   Containers
   -------------------------------------------------------------------------- */
.glossier-account-container--small {
  max-width: 460px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.glossier-account-container--medium {
  max-width: 696px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.glossier-account-container--full {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .glossier-account-container--full,
  .glossier-account-container--medium {
    padding: 0 16px;
  }
}

/* --------------------------------------------------------------------------
   Header Row (Title left, Action right)
   -------------------------------------------------------------------------- */
.ac-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.ac-header-col-left {
  flex: 1;
}

.ac-header-col-right {
  flex-shrink: 0;
  margin-left: 20px;
}

.ac-header-sublinks {
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   Headings & Sub-headings
   -------------------------------------------------------------------------- */
.ac-heading {
  font-family: Apercu, "Gill Sans", sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 41.6px;
  letter-spacing: 0.32px;
  color: #000000;
  margin: 0 0 8px 0;
  text-transform: none;
}

@media (max-width: 767px) {
  .ac-heading {
    font-size: 28px;
    line-height: 36px;
  }
}

.ac-subtext {
  font-family: Apercu, "Gill Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #000000;
  margin: 0 0 24px 0;
}

.ac-section-header__hdg {
  font-family: Apercu, "Gill Sans", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0.48px;
  color: #000000;
  text-transform: uppercase;
  margin: 40px 0 12px 0;
}

.ac-section-divider {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #000000;
  margin: 0 0 24px 0;
}

/* --------------------------------------------------------------------------
   Empty State (Smiley hand illustration)
   -------------------------------------------------------------------------- */
.ac-empty-state {
  text-align: center;
  max-width: 440px;
  margin: 24px auto 32px;
  padding: 16px;
}

.ac-empty-icon {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ac-empty-icon img {
  width: 76px;
  height: 36px;
  display: block;
}

.ac-empty-title {
  font-family: Apercu, "Gill Sans", sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  color: #000000;
  margin: 0 0 8px 0;
  text-align: center;
}

.ac-empty-desc {
  font-family: Apercu, "Gill Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #000000;
  margin: 0 auto 24px;
  text-align: center;
  max-width: 410px;
}

.ac-empty-btn-wrap {
  display: flex;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Account Details Section
   -------------------------------------------------------------------------- */
.ac-details-content {
  font-family: Apercu, "Gill Sans", sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: #000000;
}

.ac-details-name {
  font-weight: 500;
  margin: 0 0 4px 0;
}

.ac-details-text {
  margin: 0 0 4px 0;
  color: #333333;
}

.ac-details-location {
  margin: 4px 0 20px 0;
  color: #000000;
}

.ac-details-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   Address Cards & Grid
   -------------------------------------------------------------------------- */
.ac-address-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px 48px;
  margin-top: 16px;
}

@media (max-width: 767px) {
  .ac-address-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.ac-address-card {
  padding: 0;
  margin: 0;
}

.ac-address-text {
  font-family: Apercu, "Gill Sans", sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: #000000;
  margin-bottom: 16px;
}

.ac-address-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* --------------------------------------------------------------------------
   Form Fields & Grid
   -------------------------------------------------------------------------- */
.ac-form {
  width: 100%;
}

.ac-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin-bottom: 16px;
}

@media (max-width: 767px) {
  .ac-form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.ac-form-grid--full {
  grid-column: 1 / -1;
}

.ac-input-group {
  position: relative;
  margin-bottom: 12px;
  width: 100%;
}

.ac-input-group .ac-input {
  display: block;
  width: 100%;
  height: 50px;
  min-height: 50px;
  padding: 18px 12px 6px;
  font-family: Apercu, "Gill Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #000000;
  background-color: transparent;
  border: 1px solid #e8e8e8;
  border-radius: 0;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ac-input-group .ac-input:focus {
  border-color: #000000;
  box-shadow: 0 0 0 1px #000000;
}

.ac-input-group.has-error .ac-input,
.ac-input-group .ac-input.is-invalid {
  border-bottom: 1px solid #d30000 !important;
}

.ac-input-group label {
  position: absolute;
  left: 12px;
  top: 16px;
  font-family: Apercu, "Gill Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #666666;
  margin: 0;
  padding: 0;
  pointer-events: none;
  transition: all 0.18s cubic-bezier(0.2, 0, 0.2, 1);
  transform-origin: left top;
}

.ac-input-group.has-value label,
.ac-input-group:focus-within label {
  top: 6px;
  font-size: 11px;
  line-height: 12px;
  color: #767676;
}

.ac-error-msg {
  font-family: Apercu, "Gill Sans", sans-serif;
  font-size: 12px;
  color: #d30000;
  margin-top: 4px;
  margin-bottom: 12px;
  text-align: left;
}

/* Select inputs */
.ac-select-group select.ac-input {
  padding-top: 18px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
}

/* --------------------------------------------------------------------------
   Buttons & Links
   -------------------------------------------------------------------------- */
.ac-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
}

.ac-actions-row--center {
  justify-content: center;
}

.ac-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  padding: 8px 24px;
  background-color: #ffffff;
  color: #000000;
  font-family: Apercu, "Gill Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 19.6px;
  letter-spacing: 0.026px;
  text-decoration: none;
  border: none;
  border-bottom: 1px solid #000000;
  border-right: 1px solid #000000;
  border-radius: 0;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.ac-btn-primary:hover,
.ac-btn-primary:focus {
  background-color: #f7f7f7;
  color: #000000;
  text-decoration: none;
  background-size: 5px 1px, 5px 1px, 1px 5px, 1px 5px;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  background-image: 
    linear-gradient(to right, #000000 50%, transparent 50%), 
    linear-gradient(to right, #000000 50%, transparent 50%), 
    linear-gradient(to bottom, #000000 50%, transparent 50%), 
    linear-gradient(to bottom, #000000 50%, transparent 50%);
  -webkit-animation: 1.5s linear infinite marching-ants-full-1;
  animation: 1.5s linear infinite marching-ants-full-1;
}

.ac-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  padding: 8px 24px;
  background-color: #ffffff;
  color: #000000;
  font-family: Apercu, "Gill Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 19.6px;
  border: 1px solid #000000;
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.ac-btn-secondary:hover {
  background-color: #f7f7f7;
  color: #000000;
  text-decoration: none;
}

.ac-link-underline {
  font-family: Apercu, "Gill Sans", sans-serif;
  font-size: 14px;
  color: #000000;
  text-decoration: none;
  border-bottom: 1px solid #000000;
  padding-bottom: 1px;
  background: transparent;
  cursor: pointer;
  display: inline-block;
  line-height: 1.3;
}

.ac-link-underline:hover {
  opacity: 0.7;
  text-decoration: none;
  color: #000000;
}

.glossier-account-area a:focus,
.glossier-account-area a:focus:not(:focus-visible),
.glossier-account-area button:focus:not(:focus-visible),
.glossier-account-area .ac-link-underline:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   Checkboxes
   -------------------------------------------------------------------------- */
.ac-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0;
  cursor: pointer;
}

.ac-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #000000;
  flex-shrink: 0;
  cursor: pointer;
}

.ac-checkbox label {
  font-family: Apercu, "Gill Sans", sans-serif;
  font-size: 13px;
  line-height: 18px;
  color: #000000;
  font-weight: 400;
  cursor: pointer;
  margin: 0;
}

.ac-checkbox a {
  color: #000000;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Tables (Orders & History)
   -------------------------------------------------------------------------- */
.ac-orders-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.ac-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Apercu, "Gill Sans", sans-serif;
  margin-bottom: 24px;
}

.ac-table th {
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.48px;
  color: #666666;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid #000000;
  text-align: left;
}

.ac-table td {
  font-size: 14px;
  line-height: 20px;
  color: #000000;
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.ac-table .text-right {
  text-align: right;
  padding-right: 0;
}

.ac-status-badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1;
  background-color: #f5f5f5;
  color: #000000;
  border-radius: 2px;
}

.ac-more-orders-link {
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   Alerts & Notifications
   -------------------------------------------------------------------------- */
.ac-alert {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 20px;
  margin-bottom: 24px;
  font-family: Apercu, "Gill Sans", sans-serif;
  border-radius: 0;
}

.ac-alert--danger {
  background-color: #faf2f4;
  color: #d30000;
  border-left: 3px solid #d30000;
}

.ac-alert--success {
  background-color: #f0fdf4;
  color: #00ac5a;
  border-left: 3px solid #00ac5a;
}

/* --------------------------------------------------------------------------
   Mobile Order Items & Responsive Cards (<= 767px)
   -------------------------------------------------------------------------- */
.ac-order-items--desktop,
.ac-order-history--desktop {
  display: block;
}

.ac-order-items--mobile,
.ac-order-history--mobile {
  display: none;
}

@media (max-width: 767px) {
  .ac-order-items--desktop,
  .ac-order-history--desktop {
    display: none !important;
  }

  .ac-order-items--mobile,
  .ac-order-history--mobile {
    display: block !important;
  }

  /* Mobile Item Card */
  .ac-mobile-item-card {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .ac-mobile-item-card:first-child {
    padding-top: 4px;
  }

  .ac-mobile-item-card:last-child {
    border-bottom: none;
  }

  .ac-mobile-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 6px;
  }

  .ac-mobile-item-title {
    font-family: Apercu, "Gill Sans", sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 20px;
    color: #000000;
    flex: 1;
  }

  .ac-mobile-item-total {
    font-family: Apercu, "Gill Sans", sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #000000;
    white-space: nowrap;
    text-align: right;
  }

  .ac-mobile-item-options {
    font-family: Apercu, "Gill Sans", sans-serif;
    font-size: 13px;
    line-height: 18px;
    color: #666666;
    margin-bottom: 6px;
  }

  .ac-mobile-item-options span {
    display: block;
  }

  .ac-mobile-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: Apercu, "Gill Sans", sans-serif;
    font-size: 13px;
    line-height: 18px;
    color: #444444;
    margin-bottom: 12px;
  }

  .ac-mobile-item-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
  }

  /* Mobile Totals List */
  .ac-mobile-totals {
    margin-top: 20px;
    padding-top: 0;
    border-top: none;
  }

  .ac-mobile-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-family: Apercu, "Gill Sans", sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #333333;
  }

  .ac-mobile-total-row--final {
    padding-top: 8px;
    margin-top: 4px;
    border-top: none;
    font-size: 16px;
    font-weight: 500;
    color: #000000;
  }

  .ac-mobile-total-label {
    flex: 1;
    padding-right: 12px;
  }

  .ac-mobile-total-value {
    white-space: nowrap;
    text-align: right;
  }

  /* Mobile History List */
  .ac-mobile-history-card {
    padding: 12px 0;
    border-bottom: none;
  }

  .ac-mobile-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
  }

  .ac-mobile-history-date {
    color: #666666;
  }

  .ac-mobile-history-comment {
    font-size: 13px;
    line-height: 18px;
    color: #000000;
  }
}
