/* Micromodal - Clean Modal System */

.micromodal-slide {
  display: none;
}

.micromodal-slide.is-open {
  display: block;
}

.modal__overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1050;
}

.modal__container {
  background-color: #fff;
  padding: 0;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  border-radius: 4px;
  overflow-y: auto;
  box-shadow: 0 5px 15px rgba(0,0,0,.5);
  position: relative;
}

.modal__header {
  padding: 20px 30px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.modal__close {
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  line-height: 1;
  color: #999;
}

.modal__close:hover {
  color: #000;
}

.modal__close::before {
  content: "×";
  font-size: 2rem;
  display: block;
}

.modal__content {
  padding: 30px;
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
  gap: 10px;
}

.modal-tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  transition: all 0.3s;
}

.modal-tab:hover {
  color: #333;
  background: #f8f8f8;
}

.modal-tab.active {
  color: #333;
  border-bottom-color: #007bff;
  font-weight: 600;
}

.modal-tab-content {
  display: none;
}

.modal-tab-content.active {
  display: block;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Form Styling */
.modal__content .form-group {
  margin-bottom: 20px;
}

/* Alert Styling */
.modal__content .alert {
  padding: 12px 20px;
  margin-bottom: 15px;
  border: 1px solid transparent;
  border-radius: 4px;
}

.modal__content .alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.modal__content .alert-light {
  color: #6c757d;
  background-color: #f8f9fa;
  border-color: #dee2e6;
}

/* Error state styling */
.modal__content .error {
  border-color: #dc3545 !important;
}

.modal__content .has-error .form-control {
  border-color: #dc3545 !important;
}

.modal__content label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.modal__content .form-control {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.modal__content .form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,.1);
}

.modal__content .btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.modal__content .btn-primary {
  background: #007bff;
  color: #fff;
}

.modal__content .btn-primary:hover {
  background: #0056b3;
}

.modal__content .btn-block {
  width: 100%;
  display: block;
}

.modal__content p {
  margin-bottom: 20px;
  color: #666;
}

/* Animation */
@keyframes mmfadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mmslideIn {
  from {
    transform: translateY(-15%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.micromodal-slide {
  display: none;
}

.micromodal-slide.is-open {
  display: block;
}

.micromodal-slide[aria-hidden="false"] .modal__overlay {
  animation: mmfadeIn 0.3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="false"] .modal__container {
  animation: mmslideIn 0.3s cubic-bezier(0, 0, .2, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__overlay {
  animation: mmfadeOut 0.3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__container {
  animation: mmslideOut 0.3s cubic-bezier(0, 0, .2, 1);
}

.micromodal-slide .modal__container,
.micromodal-slide .modal__overlay {
  will-change: transform;
}

/* Responsive */
@media (max-width: 768px) {
  .modal__container {
    width: 95%;
    max-width: none;
  }
  
  .modal__header,
  .modal__content {
    padding: 20px;
  }
}

