/* Address Book Custom CSS - Wireframe Style */

/* Container และ Layout */
.address-book-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ปุ่มเพิ่มที่อยู่ */
.address-book-add-btn {
  background-color: #007bff;
  border: 2px solid #007bff;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 16px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.address-book-add-btn:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

/* Card Container */
.address-book-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

/* Address Card */
.address-book-card {
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s ease;
}

.address-book-card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Card Title */
.address-book-card-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.address-book-card-title .address-book-default-badge {
  background-color: #28a745;
  color: white;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
}

/* Card Content */
.address-book-card-content {
  color: #666;
  line-height: 1.5;
  margin-bottom: 15px;
  min-height: 80px;
}

/* Edit Button */
.address-book-edit-btn {
  background-color: #6c757d;
  border: 1px solid #6c757d;
  color: white;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.address-book-edit-btn:hover {
  background-color: #545b62;
  border-color: #545b62;
}

/* Offcanvas Overlay */
.address-book-offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100vh;
  background-color: white;
  border-left: 2px solid #ddd;
  box-shadow: -3px 0 10px rgba(0,0,0,0.1);
  z-index: 1050;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.address-book-offcanvas.show {
  transform: translateX(0);
}

/* Offcanvas Header */
.address-book-offcanvas-header {
  padding: 20px;
  border-bottom: 2px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.address-book-offcanvas-title {
  font-size: 20px;
  font-weight: bold;
  margin: 0;
  color: #333;
}

.address-book-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.address-book-close-btn:hover {
  color: #333;
}

/* Offcanvas Body */
.address-book-offcanvas-body {
  padding: 20px;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

/* Form Styles */
.address-book-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.address-book-form-group {
  display: flex;
  flex-direction: column;
}

.address-book-form-label {
  font-weight: bold;
  margin-bottom: 5px;
  color: #333;
  font-size: 14px;
}

.address-book-form-input {
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.address-book-form-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Checkbox Group */
.address-book-checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.address-book-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #007bff;
}

.address-book-checkbox-label {
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

/* Submit Button */
.address-book-submit-btn {
  background-color: #28a745;
  border: 2px solid #28a745;
  color: white;
  padding: 12px 20px;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
}

.address-book-submit-btn:hover {
  background-color: #218838;
  border-color: #218838;
}

/* Backdrop */
.address-book-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.5);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.address-book-backdrop.show {
  opacity: 1;
  visibility: visible;
}

/* Body states */
body.offcanvas-open {
  overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
  .address-book-container {
    padding: 15px;
  }
  
  .address-book-cards {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .address-book-offcanvas {
    width: 100%;
  }
  
  .address-book-card {
    padding: 15px;
  }
}