/**
 * AutoWalk Styles v1.7 (Mobile-optimized FINAL)
 */

/* ============================================
   ÌÎÄÀËÜÍÎÅ ÎÊÍÎ
   ============================================ */

.awalk-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font, 'IBM Plex Sans', sans-serif);
}

.awalk-modal.awalk-modal-show {
  display: flex;
}

.awalk-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  animation: awalk-fadeIn 0.3s ease;
}

.awalk-modal-content {
  position: relative;
  width: 90%;
  max-width: 480px;
  max-height: 80vh;
  background: var(--main-bg, #1E1E1E);
  border: 1px solid var(--borders, #2F2F2F);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: awalk-slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

/* ============================================
   ÇÀÃÎËÎÂÎÊ
   ============================================ */

.awalk-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--main-bg-second, #272727);
  border-bottom: 1px solid var(--borders, #2F2F2F);
  flex-shrink: 0;
}

.awalk-modal-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text3, #E3E2E2);
  text-transform: uppercase;
}

.awalk-close-btn {
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--text2, #bbb);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.awalk-close-btn:hover {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
}

/* ============================================
   ÒÅËÎ ÌÎÄÀËÀ
   ============================================ */

.awalk-modal-body {
  padding: 10px;
  overflow-y: auto;
  flex: 1;
}

.awalk-modal-body::-webkit-scrollbar {
  width: 6px;
}

.awalk-modal-body::-webkit-scrollbar-track {
  background: var(--main-bg-second, #272727);
}

.awalk-modal-body::-webkit-scrollbar-thumb {
  background: var(--main-bg-five, #707070);
  border-radius: 3px;
}

.awalk-modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--accent, #D43474);
}

/* ============================================
   ÑÅÊÖÈÈ
   ============================================ */

.awalk-section {
  margin-bottom: 16px;
}

.awalk-section:last-child {
  margin-bottom: 0;
}

.awalk-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.awalk-section-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text3, #E3E2E2);
}

.awalk-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* ============================================
   ÑÏÈÑÎÊ ÀÊÊÀÓÍÒÎÂ
   ============================================ */

.awalk-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.awalk-empty-state {
  padding: 20px 12px;
  text-align: center;
  color: var(--special-text2, #817f7c);
  font-size: 13px;
}

/* ============================================
   ÊÀÐÒÎ×ÊÀ ÀÊÊÀÓÍÒÀ
   ============================================ */

.awalk-account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 6px;
  background: var(--main-bg-second, #272727);
  border: 1px solid var(--borders, #2F2F2F);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
/*  min-height: 44px;*/
  gap: 8px;
}

.awalk-account-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: transparent;
  transition: all 0.3s;
}

.awalk-account-card:active {
  background: var(--main-bg-third, #1F1F1F);
  border-color: var(--accent, #D43474);
  transform: scale(0.98);
}

.awalk-account-card:active::before {
  background: var(--accent, #D43474);
}

.awalk-card-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.awalk-card-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.awalk-card-username {
  font-size: 13px;
  color: var(--text3, #E3E2E2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.awalk-card-status {
  font-size: 14px;
  margin-left: 4px;
  flex-shrink: 0;
}

/* Ñîñòîÿíèÿ êàðòî÷êè */
.awalk-account-card.awalk-processing {
  border-color: var(--accent-second, #2B88DF);
  animation: awalk-pulse 1.5s infinite;
}

.awalk-account-card.awalk-done {
  border-color: #4caf50;
  opacity: 0.8;
}

.awalk-account-card.awalk-error {
  border-color: #f44336;
}

/* Ïîäòâåðæäåíèå óäàëåíèÿ */
.awalk-account-card.awalk-confirm-delete {
  background: rgba(244, 67, 54, 0.1);
  border-color: #f44336;
  cursor: default;
  flex-direction: column;
  align-items: stretch;
  padding: 12px;
}

.awalk-confirm-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.awalk-confirm-content span {
  font-size: 13px;
  color: var(--text3, #E3E2E2);
  text-align: center;
}

.awalk-confirm-actions {
  display: flex;
  gap: 8px;
}

/* ============================================
   ÊÍÎÏÊÈ
   ============================================ */

.awalk-btn {
  padding: 10px 10px;
  border: none;
  font-family: var(--font, 'IBM Plex Sans', sans-serif);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(0% 10px, 10px 0%, 100% 0%, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
      -webkit-clip-path: polygon(0% 10px, 10px 0%, 100% 0%, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.awalk-btn-primary {
  background: var(--accent, #D43474);
  color: #fff;
}

.awalk-btn-primary:active {
  background: #c12a66;
  transform: scale(0.95);
}

.awalk-btn-secondary {
  background: var(--accent-second, #2B88DF);
  color: #fff;
    flex: 1;
}

.awalk-btn-secondary:active {
  background: #2376c7;
  transform: scale(0.95);
}

.awalk-btn-danger {
  background: #f44336;
  color: #fff;
  padding: 8px 12px;
  font-size: 12px;
  min-height: 36px;
  flex: 1;
}

.awalk-btn-danger:active {
  background: #d32f2f;
  transform: scale(0.95);
}

/* Êíîïêà óäàëåíèÿ */
.awalk-delete-btn {
  background: transparent;
  border: 1px solid var(--borders, #2F2F2F);
  padding: 6px 8px;
  font-size: 12px;
  color: var(--text2, #bbb);
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.awalk-delete-btn:active {
  background: rgba(244, 67, 54, 0.2);
  border-color: #f44336;
  color: #f44336;
  transform: scale(0.9);
}

/* Êíîïêà äîáàâëåíèÿ */
.awalk-btn-add {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 2px dashed var(--borders, #2F2F2F);
  color: var(--text2, #bbb);
  font-family: var(--font, 'IBM Plex Sans', sans-serif);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
}

.awalk-btn-add:active {
  border-color: var(--accent, #D43474);
  border-style: solid;
  color: var(--accent, #D43474);
  background: rgba(212, 52, 116, 0.1);
  transform: scale(0.98);
}

.awalk-plus {
  font-size: 16px;
  font-weight: 600;
}

/* ============================================
   ÔÎÐÌÀ ÄÎÁÀÂËÅÍÈß
   ============================================ */

.awalk-add-form {
  margin-top: 12px;
  padding: 12px;
  background: var(--main-bg-third, #1F1F1F);
  border: 1px solid var(--borders, #2F2F2F);
  animation: awalk-slideDown 0.3s ease;
}

.awalk-input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--main-bg, #1E1E1E);
  border: 1px solid var(--borders, #2F2F2F);
  color: var(--text3, #E3E2E2);
  font-family: var(--font, 'IBM Plex Sans', sans-serif);
  font-size: 13px;
  transition: all 0.3s;
  box-sizing: border-box;
  min-height: 40px;
}

.awalk-input:focus {
  outline: none;
  border-color: var(--accent, #D43474);
  box-shadow: 0 0 0 3px rgba(212, 52, 116, 0.1);
}

.awalk-input::placeholder {
  color: var(--special-text2, #817f7c);
}

.awalk-form-actions {
  display: flex;
  gap: 8px;
}

.awalk-form-actions .awalk-btn {
  flex: 1;
}

/* ============================================
   ÀÂÒÎÂÛÃÓË
   ============================================ */

.awalk-autowalk-info {
  margin-bottom: 10px;
}

.awalk-autowalk-info p {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text2, #bbb);
  margin: 0;
  padding: 6px 8px;
  background: rgba(43, 136, 223, 0.1);
  border-left: 2px solid var(--accent-second, #2B88DF);
}

.awalk-autowalk-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.awalk-delay-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text2, #bbb);
  font-size: 12px;
  padding: 8px 10px;
  background: var(--main-bg-second, #272727);
}

.awalk-delay-input {
  width: 50px;
  padding: 6px 8px;
  background: var(--main-bg, #1E1E1E);
  border: 1px solid var(--borders, #2F2F2F);
  border-radius: 4px;
  color: var(--text3, #E3E2E2);
  font-family: var(--font-a, 'IBM Plex Mono', monospace);
  font-size: 13px;
  text-align: center;
  min-height: 32px;
}

.awalk-delay-input:focus {
  outline: none;
  border-color: var(--accent-second, #2B88DF);
}

.awalk-autowalk-controls .awalk-btn {
  width: 100%;
}

/* Ïðîãðåññ */
.awalk-progress {
  margin-top: 10px;
  animation: awalk-slideDown 0.3s ease;
}

.awalk-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--main-bg-second, #272727);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.awalk-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent, #D43474) 0%, var(--accent-second, #2B88DF) 100%);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}

.awalk-progress-text {
  text-align: center;
  color: var(--text2, #bbb);
  font-size: 12px;
}

/* ============================================
   ÒÎÑÒÛ (ÓÂÅÄÎÌËÅÍÈß)
   ============================================ */

.awalk-toast {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  padding: 12px 16px;
  background: var(--main-bg-second, #272727);
  border: 1px solid var(--borders, #2F2F2F);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10001;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.awalk-toast.awalk-toast-show {
  opacity: 1;
  transform: translateY(0);
}

.awalk-toast-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.awalk-toast-message {
  color: var(--text3, #E3E2E2);
  font-size: 12px;
  font-weight: 500;
}

.awalk-toast-success {
  border-left: 3px solid #4caf50;
}

.awalk-toast-error {
  border-left: 3px solid #f44336;
}

.awalk-toast-info {
  border-left: 3px solid var(--accent-second, #2B88DF);
}

/* ============================================
   ÀÍÈÌÀÖÈÈ
   ============================================ */

@keyframes awalk-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes awalk-slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes awalk-slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

@keyframes awalk-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(43, 136, 223, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(43, 136, 223, 0);
  }
}

/* ============================================
   ÀÄÀÏÒÈÂÍÎÑÒÜ (ÌÎÁÈËÜÍÛÅ)
   ============================================ */

@media (max-width: 768px) {

#navAutoWalk a span:before {
		content: "\f2b9";
		font-family: FontAwesome;
	}

  .awalk-modal-content {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }

  .awalk-modal-header {
    padding: 12px 16px;
  }

  .awalk-modal-body {
    padding: 12px;
  }
}

/* Äåñêòîï hover-ýôôåêòû (òîëüêî äëÿ ìûøêè) */
@media (hover: hover) and (pointer: fine) {
  .awalk-account-card:hover {
    background: var(--main-bg-third, #1F1F1F);
    border-color: var(--accent, #D43474);
    box-shadow: 0 0 20px rgba(212, 52, 116, 0.2);
    transform: translateX(4px);
  }

  .awalk-account-card:hover::before {
    background: var(--accent, #D43474);
  }

  .awalk-btn-primary:hover {
    background: linear-gradient(135deg, var(--accent, #D43474) 0%, #e84a8a 100%);
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(212, 52, 116, 0.4);
    transform: translateY(-2px);
  }

  .awalk-btn-secondary:hover {
    background: linear-gradient(135deg, var(--accent-second, #2B88DF) 0%, #4a9ef5 100%);
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(43, 136, 223, 0.4);
    transform: translateY(-2px);
  }

  .awalk-btn-danger:hover {
    background: #d32f2f;
    border-radius: 4px;
        clip-path: none;
  }

  .awalk-delete-btn:hover {
    background: rgba(244, 67, 54, 0.1);
    border-color: #f44336;
    border-radius: 4px;
    color: #f44336;
    transform: scale(1.05);
        clip-path: none;
  }

  .awalk-btn-add:hover {
    border-color: var(--accent, #D43474);
    border-style: solid;
    border-radius: 4px;
    color: var(--accent, #D43474);
    background: rgba(212, 52, 116, 0.05);
        clip-path: none;
  }

  .awalk-close-btn:hover {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
        clip-path: none;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.awalk-btn:focus,
.awalk-input:focus,
.awalk-delete-btn:focus,
.awalk-close-btn:focus {
  outline: 2px solid var(--accent, #D43474);
  outline-offset: 2px;
}

/* Äëÿ ïîëüçîâàòåëåé ñ prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   ÌÎÁÈËÜÍÀß ÍÀÂÈÃÀÖÈß (ÂÀÆÍÎ!)
   ============================================ */
@media (max-width: 768px) {
  #navAutoWalk {
    display: block !important;
  }
  
  #navAutoWalk a {
    display: block !important;
  }
}