/* ========== МОДАЛЬНЫЕ ОКНА ========== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-modal);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1;
}

.modal__content {
  position: relative;
  z-index: 2;
  background-color: var(--light-color);
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 500px;
  padding: var(--space-xxl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(50px);
  transition: transform 0.3s ease;
  margin: 0 var(--space-md);
}

.modal.active .modal__content {
  transform: translateY(0);
}

.modal__content--success {
  text-align: center;
  max-width: 450px;
}

.modal__close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  font-size: 2.4rem;
  cursor: pointer;
  color: var(--gray-color);
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 0;
}

.modal__close:hover,
.modal__close:focus {
  color: var(--primary-color);
  transform: rotate(90deg);
  outline: none;
}

.modal__title {
  font-size: 2.6rem;
  margin-bottom: var(--space-md);
}

.modal__subtitle {
  color: var(--gray-color);
  margin-bottom: var(--space-xl);
  font-size: 1.6rem;
}

.modal__icon {
  font-size: 6rem;
  color: var(--primary-color);
  margin-bottom: var(--space-lg);
}

.modal__btn {
  margin-top: var(--space-xl);
  padding: var(--space-sm) var(--space-lg);
}

/* Maintenance Modal */
.maintenance-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    display: none;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.maintenance-modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    z-index: -1;
}

.maintenance-modal__content {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    padding: 30px;
    text-align: center;
    pointer-events: auto;
    position: relative;
    border: 1px solid #eee;
}

.maintenance-modal__icon {
    font-size: 50px;
    color: #ff6b00;
    margin-bottom: 20px;
}

.maintenance-modal__title {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.maintenance-modal__text {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.maintenance-form {
    margin: 25px 0;
}

.maintenance-contacts {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.maintenance-contacts p {
    margin-bottom: 10px;
    color: #555;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0066cc;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
}

.contact-link:hover {
    text-decoration: underline;
}

.btn--loading .fa-paper-plane {
    display: none;
}

.btn--loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* ========== NOTIFICATION STYLES ========== */
.notification-area {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: var(--z-modal);
}

.notification {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: var(--border-radius);
    color: var(--light-color);
    animation: slideIn 0.3s ease-out;
    box-shadow: var(--box-shadow);
    max-width: 300px;
}

.notification-success {
    background-color: var(--success-color);
}

.notification-error {
    background-color: var(--error-color);
}

.notification-warning {
    background-color: var(--primary-color);
}

.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

/* ========== CAPTCHA STYLES ========== */
.captcha-container {
    margin: var(--space-md) 0;
    padding: var(--space-md);
    background: var(--light-gray);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.captcha-container input {
    width: 100%;
    padding: var(--space-sm);
}

/* ========== LOADING INDICATOR ========== */
.btn--loading .fa-spinner {
    display: inline-block;
}

.btn--loading .fa-paper-plane {
    display: none;
}

.fa-spinner {
    display: none;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; }
}