/* Address Page Styles */

/* Header Button */
.btn-add-address {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-address:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Address List */
.address-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}

/* Address Card */
.address-card {
  position: relative;
  background: white;
  border: 2px solid #e1e4e8;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s;
}

.address-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.address-card.default {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.address-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.address-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.address-user-info h4 {
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
  margin: 0;
}

.address-phone {
  font-size: 14px;
  color: #718096;
}

.address-badges {
  display: flex;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
}

.badge-default {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.badge-home {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-office {
  background: #e3f2fd;
  color: #1565c0;
}

.address-content {
  margin-bottom: 16px;
}

.address-detail {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.address-detail i {
  width: 18px;
  color: #667eea;
  margin-top: 2px;
}

.address-detail span {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.5;
}

.address-note {
  margin-top: 12px;
  padding: 10px 14px;
  background: #f7f8fc;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.address-note i {
  color: #f6ad55;
  font-size: 14px;
  margin-top: 2px;
}

.address-note span {
  font-size: 13px;
  color: #718096;
  font-style: italic;
}

.address-actions {
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid #e1e4e8;
}

.btn-address-action {
  padding: 8px 16px;
  border: 1px solid #e1e4e8;
  background: white;
  color: #4a5568;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-address-action:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
}

.btn-address-action.btn-edit:hover {
  color: #667eea;
  border-color: #667eea;
}

.btn-address-action.btn-delete:hover {
  color: #e53e3e;
  border-color: #e53e3e;
}

.btn-address-action.btn-set-default {
  color: #667eea;
}

.btn-address-action.btn-set-default:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.empty-icon {
  font-size: 64px;
  color: #cbd5e0;
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 20px;
  color: #2d3748;
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 14px;
  color: #718096;
  margin-bottom: 24px;
}

.btn-add-address-empty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-address-empty:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

/* Tips Section */
.address-tips {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 20px;
}

.address-tips h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 12px;
}

.address-tips h4 i {
  color: #f59e0b;
}

.address-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.address-tips ul li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: #78350f;
  margin-bottom: 8px;
  line-height: 1.5;
}

.address-tips ul li:last-child {
  margin-bottom: 0;
}

.address-tips ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #92400e;
  font-weight: bold;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal.active {
  display: flex;
}

.modal-dialog {
  width: 100%;
  max-width: 600px;
  animation: modalSlideIn 0.3s ease-out;
}

.modal-dialog.modal-sm {
  max-width: 400px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e1e4e8;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: white;
  color: #718096;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 18px;
}

.modal-close:hover {
  background: #f7fafc;
  color: #2d3748;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid #e1e4e8;
  margin-top: 20px;
}

/* Form Styles */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
}

.required {
  color: #e53e3e;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 14px;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:disabled,
.form-group select:disabled {
  background: #f7fafc;
  cursor: not-allowed;
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

/* Address Type Selector */
.address-type-selector {
  display: flex;
  gap: 12px;
}

.type-option {
  flex: 1;
  cursor: pointer;
}

.type-option input {
  display: none;
}

.type-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 2px solid #e1e4e8;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #718096;
  transition: all 0.2s;
}

.type-option input:checked + .type-label {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  color: #667eea;
}

.type-label i {
  font-size: 16px;
}

/* Checkbox */
.checkbox-group {
  margin-top: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #4a5568;
}

.checkbox-label input {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #e1e4e8;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.checkbox-label input:checked + .checkmark {
  background: #667eea;
  border-color: #667eea;
}

.checkbox-label input:checked + .checkmark::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* Buttons */
.btn-secondary {
  padding: 12px 24px;
  border: 1px solid #e1e4e8;
  background: white;
  color: #4a5568;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
}

.btn-primary {
  padding: 12px 24px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-danger {
  padding: 12px 24px;
  border: none;
  background: #e53e3e;
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-danger:hover {
  background: #c53030;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

/* Delete Warning */
.delete-warning {
  text-align: center;
  padding: 20px 0;
}

.delete-warning i {
  font-size: 48px;
  color: #f6ad55;
  margin-bottom: 16px;
}

.delete-warning p {
  font-size: 16px;
  color: #2d3748;
  margin-bottom: 8px;
}

.delete-warning .sub-text {
  font-size: 14px;
  color: #718096;
}

/* Notification Toast */
.notification-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 16px 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10001;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease-out;
  max-width: 400px;
}

.notification-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.notification-toast.success {
  border-left: 4px solid #48bb78;
}

.notification-toast.success i {
  color: #48bb78;
  font-size: 24px;
}

.notification-toast.error {
  border-left: 4px solid #e53e3e;
}

.notification-toast.error i {
  color: #e53e3e;
  font-size: 24px;
}

.notification-toast .message {
  flex: 1;
}

.notification-toast .message strong {
  display: block;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 4px;
}

.notification-toast .message span {
  font-size: 14px;
  color: #718096;
}

/* Responsive */
@media (max-width: 768px) {
  .account-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .btn-add-address {
    width: 100%;
    justify-content: center;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .address-card-header {
    flex-direction: column;
    gap: 12px;
  }
  
  .address-badges {
    order: -1;
  }
  
  .address-actions {
    flex-wrap: wrap;
  }
  
  .btn-address-action {
    flex: 1;
    justify-content: center;
    min-width: calc(50% - 4px);
  }
  
  .modal-dialog {
    max-width: 100%;
    margin: 10px;
  }
  
  .notification-toast {
    right: 15px;
    left: 15px;
    bottom: 15px;
    max-width: none;
  }
  
  .address-type-selector {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .address-card {
    padding: 16px;
  }
  
  .empty-icon {
    font-size: 48px;
  }
  
  .empty-state h3 {
    font-size: 18px;
  }
  
  .modal-body {
    padding: 16px;
  }
  
  .modal-footer {
    flex-direction: column;
  }
  
  .modal-footer button {
    width: 100%;
    justify-content: center;
  }
}

