@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Georgian:wght@300;400;500;600;700&display=swap");

:root {
  --bg-clr: #00599f;
  --white: #fff;
  --text-clr: #495057;
  --success-clr: #198754;
  --success-hvr: #157347;
  --error-clr: #dc3545;
  --error-hvr: #bb2d3b;
  --cancel-clr: #6c757d;
  --border-radius: 0.75rem;
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  --transition: all 0.3s ease;
}

.wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.modal {
  z-index: 1050;
}

.modal_btns {
  display: flex;
  justify-content: space-between;
  width: 350px;
  margin-right: 10px;
}

.success_btn {
  background: linear-gradient(45deg, var(--success-clr), #20c997);
  box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
  transition: var(--transition);
}

.error_btn {
  background: linear-gradient(45deg, var(--error-clr), #e85d75);
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
  transition: var(--transition);
}

.success_btn:hover {
  background: linear-gradient(45deg, var(--success-hvr), #199176);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(25, 135, 84, 0.4);
}

.error_btn:hover {
  background: linear-gradient(45deg, var(--error-hvr), #c73650);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

/* Modal Wrapper */
.modal_wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  visibility: hidden;
  z-index: 1050;
  font-family: 'Noto Sans Georgian', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.modal_wrapper .shadow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: all 0.3s ease;
}

.modal_wrapper .modal {
  width: 400px;
  max-width: 90vw;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
}

.modal_wrapper.active .modal {
  transform: translate(-50%, -50%) scale(1);
}

.modal_wrapper .modal .modal_item {
  width: 100%;
  background: var(--white);
  border-radius: var(--border-radius);
  position: relative;
  display: none;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalSlideIn 0.4s ease-out;
}

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

.modal_item .modal_body {
  padding: 2.5rem 2rem;
  text-align: center;
}

.modal_item .modal_body .s_icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(45deg, var(--success-clr), #20c997);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 25px rgba(25, 135, 84, 0.3);
  animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 25px rgba(25, 135, 84, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(25, 135, 84, 0.4);
  }
}

.modal_item.e_modal .modal_body .s_icon {
  background: linear-gradient(45deg, var(--error-clr), #e85d75);
  box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
  animation: iconShake 0.6s ease-in-out;
}

@keyframes iconShake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
  20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.modal_item .modal_body .s_text {
  color: var(--text-clr);
}

.modal_item .modal_body .s_text h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.modal_item.s_modal .modal_body .s_text h2 {
  color: var(--success-clr);
}

.modal_item.e_modal .modal_body .s_text h2 {
  color: var(--error-clr);
}

.modal_item .modal_body .s_text p {
  margin-top: 0.5rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-clr);
  opacity: 0.8;
}

/* Close Button */
.modal_item .close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 40px;
  height: 40px;
  background: var(--white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid #f8f9fa;
  color: #6c757d;
}

.modal_item .close:hover {
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.modal_item.s_modal .close:hover {
  background: var(--success-clr);
  color: var(--white);
  border-color: var(--success-clr);
}

.modal_item.e_modal .close:hover {
  background: var(--error-clr);
  color: var(--white);
  border-color: var(--error-clr);
}

.modal_item .s_button button {
  width: 100%;
  border-radius: 0;
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
}

/* Modal States */
.modal_wrapper.active {
  visibility: visible;
}

.modal_wrapper.active .shadow {
  opacity: 1;
  transition: all 0.2s ease;
}

.modal_item.s_modal.active,
.modal_item.e_modal.active {
  display: block;
}

/* Responsive Design */
@media (max-width: 576px) {
  .modal_wrapper .modal {
    width: 350px;
    max-width: 95vw;
  }
  
  .modal_item .modal_body {
    padding: 2rem 1.5rem;
  }
  
  .modal_item .modal_body .s_icon {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
  }
  
  .modal_item .modal_body .s_text h2 {
    font-size: 1.3rem;
  }
  
  .modal_item .modal_body .s_text p {
    font-size: 0.9rem;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .modal_item {
    background: #2c3e50 !important;
    color: #ecf0f1;
  }
  
  .modal_item .modal_body .s_text {
    color: #ecf0f1;
  }
  
  .modal_item .modal_body .s_text p {
    color: #bdc3c7;
  }
  
  .modal_item .close {
    background: #34495e;
    color: #ecf0f1;
    border-color: #34495e;
  }
}

/* Accessibility Enhancements */
.modal_item .close:focus {
  outline: 2px solid var(--success-clr);
  outline-offset: 2px;
}

.modal_item.e_modal .close:focus {
  outline-color: var(--error-clr);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .modal_item {
    border: 2px solid #000;
  }
  
  .modal_item .modal_body .s_icon {
    border: 2px solid #000;
  }
  
  .modal_item .close {
    border: 2px solid #000;
  }
}