.ag-root-wrapper {
  width: 100%;
}

/* Modal Background */
.modal {
  display: none;
  position: fixed;
  z-index: 3;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(4px);
}

/* Modal Content */
.modal-content {
  background-color: #E7F7E7;
  margin: 8% auto;
  padding: 32px;
  border: 1px solid #d1fae5;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
}

.modal h1 {
  text-align: center;
  color: #1e293b;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.modal-subtitle {
  text-align: center;
  color: #64748b;
  font-size: 16px;
  font-weight: 400;
  margin: 0 0 32px 0;
}

/* Close Button */
.close {
  color: #64748b;
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 24px;
  font-weight: 400;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.close:hover {
  background-color: #dcfce7;
  color: #34602F;
}

/* ===========================================
   SHARED BUTTON STYLING
   =========================================== */

/* Action Button */
.modal button[type="submit"] {
  background-color: #1e293b;
  color: white;
  border: none;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.modal button[type="submit"]:hover {
  background-color: #334155;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.modal button[type="submit"]:disabled {
  background-color: #cbd5e1;
  cursor: not-allowed;
  color: #94a3b8;
}

.button-icon {
  width: 16px;
  height: 16px;
}

/* Loading state */
.loading {
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */

@media (max-width: 640px) {
  .modal-content {
    margin: 4% auto;
    padding: 24px;
    width: 95%;
  }

  .modal h1 {
    font-size: 24px;
  }

  .modal-subtitle {
    font-size: 14px;
  }

  #add-owner input[type="text"] {
    padding: 14px;
    font-size: 16px;
    /* Prevents zoom on iOS */
  }

  .input-with-icon {
    padding-left: 44px;
  }
}
