/**
 * Styles for MicroModal.js in RaiseFi
 */

.modal {
  font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif;
}

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

.modal__container {
  background-color: #fff;
  padding: 20px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  border-radius: 10px;
  overflow-y: auto;
  box-sizing: border-box;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.modal__title {
  margin: 0;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
  color: #333;
  box-sizing: border-box;
}

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

.modal__close:before {
  content: "\2715";
}

.modal__close:hover {
  color: #333;
}

.modal__content {
  margin-bottom: 20px;
  color: #555;
  line-height: 1.5;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal__btn {
  padding: 8px 16px;
  border-radius: 5px;
  border: 1px solid #ddd;
  background-color: #f8f8f8;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.modal__btn:hover {
  background-color: #eee;
}

.modal__btn-primary {
  background-color: #4CAF50;
  color: white;
  border: none;
}

.modal__btn-primary:hover {
  background-color: #45a049;
}

/**
 * Reward Modal Specific Styles
 */
.reward-modal-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.reward-image {
  max-width: 100%;
  border-radius: 6px;
  overflow: hidden;
}

.reward-image img {
  width: 100%;
  height: auto;
  display: block;
}

.reward-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reward-amount, .reward-limit {
  margin: 0;
  font-size: 14px;
}

.reward-description {
  line-height: 1.5;
  color: #666;
}

/**
 * Modal Animations
 */
.micromodal-slide {
  display: none;
}

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

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

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

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

.micromodal-slide[aria-hidden="true"] .modal__container {
  animation: slideOut 0.3s cubic-bezier(0.0, 0.0, 0.2, 1);
  animation-fill-mode: forwards;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideIn {
  from { transform: translateY(40px); }
  to { transform: translateY(0); }
}

@keyframes slideOut {
  from { transform: translateY(0); }
  to { transform: translateY(40px); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .modal__container {
    padding: 15px;
    max-width: 90%;
  }
  
  .modal__title {
    font-size: 1.1rem;
  }
  
  .modal__btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}
