* {
  box-sizing: border-box;
}

body.carousel-active { /* Apply to body when carousel is specifically active, if needed */
  font-family: sans-serif;
  background-color: #f5f6fa; /* Or transparent if it's an overlay */
  /* display: flex; /* Avoid flex if it's part of a larger page */
  /* justify-content: center; */
  /* align-items: center; */
  /* height: 100vh; /* Avoid fixed height */
  margin: 0;
  /* flex-direction: column; */ /* Avoid if it's part of a larger page */
  /* padding-top: 20px; */ /* Avoid fixed padding */
}

.user-message {
  padding: 10px 15px;
  margin-bottom: 20px;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: .25rem;
  text-align: center;
  max-width: 500px; /* Limit width of message box */
  word-wrap: break-word; /* Wrap long messages */
  margin-left: auto; /* Center if it's a block element */
  margin-right: auto; /* Center if it's a block element */
}

.user-message.info {
  background-color: #d1ecf1;
  color: #0c5460;
  border-color: #bee5eb;
}

.user-message.empty {
    display: none; /* Hide if message is empty */
}

.deliver-box {
  width: 212.5px;
  height: 190px; /* Increased height to provide more space */
  border: 2px solid #d3d6db;
  border-radius: 20px;
  position: relative;
  overflow: visible; /* Important for nav buttons */
  background: white;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  margin: 20px auto; /* Add some margin for spacing and center */
}

.deliver-label {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 6px 20px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.deliver-label span {
  font-size: 14px;
  color: #a0a4ab;
  white-space: nowrap;
}

.carousel-content {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  color: #333;
  padding: 30px 20px 20px; /* Adjusted padding: top 30px, sides 20px, bottom 20px */
  text-align: center;
  overflow: hidden; /* Clip content that slides out */
}

.address {
  position: absolute;
  opacity: 0;
  transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center; /* Re-added to center content horizontally */
  justify-content: space-between; /* Distribute space between items, pushing button to bottom */
  /* gap: 2px; */ /* Removed as space-between handles vertical spacing */
  width: calc(100% - 40px); /* Ensure content fits within padding */
  height: calc(100% - 50px); /* Adjusted height considering new padding */
  text-align: center; /* Align text to the center */
}

.address.active {
  opacity: 1;
  transform: translateX(0);
}

.address.out-left {
  transform: translateX(-100%);
  opacity: 0;
}

.address.out-right {
  transform: translateX(100%);
  opacity: 0;
}

.address .name {
  font-weight: bold;
  font-size: 16px;
  color: #2c3e50;
  margin-bottom: 2px;
}

.address div:not(.name) {
  font-size: 13px;
  color: #555;
  line-height: 1.3;
  flex-grow: 1; /* Allow address lines to take up available space */
}

.address .address-line,
.address .address-csz,
.address .address-country,
.address .address-phone, /* Added phone number class */
.address .address-message {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.edit-button {
  margin-top: auto; /* Push button to the bottom */
  align-self: center; /* Center button horizontally */
  padding: 4px 10px;
  font-size: 12px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  text-decoration: none;
}

.edit-button:hover {
  background-color: #2980b9;
  transform: scale(1.05);
}

.edit-button:active {
  transform: scale(0.95);
}

.nav-button {
  position: absolute;
  top: 0;
  bottom: 0;
  margin: auto;
  width: 36px; /* Smaller size */
  height: 36px; /* Smaller size */
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #e6e6e6);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  color: #555;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px; /* Adjusted font size for smaller button */
  z-index: 3; /* Ensure buttons are above content */
}

.nav-button:hover {
  background: #f0f0f0;
  transform: scale(1.1);
}

.nav-button:active {
  transform: scale(0.95);
  background: #dcdcdc;
}

.nav-left {
  left: -30px; /* Move further outwards */
}

.nav-right {
  right: -30px; /* Move further outwards */
}
