.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(32, 33, 36, 0.95);
    color: #fff;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.cookie-message {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.25rem;
    text-align: center;
}

.cookie-banner h3 {
    margin: 0 0 0.75rem;
    font-size: 1.125rem;
    font-weight: 500;
    color: #fff;
}

.cookie-banner p {
    margin: 0 0 1rem;
    color: #bdc1c6;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 1rem 0;
}

.cookie-footer {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: #bdc1c6;
}

.cookie-footer a {
    color: #8ab4f8;
    text-decoration: none;
}

.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-settings-content {
    background: #202124;
    border-radius: 8px;
    max-width: 640px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    color: #fff;
}

.settings-header {
    padding: 1.5rem;
    border-bottom: 1px solid #3c4043;
}

.settings-header h3 {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 400;
    color: #fff;
}

.close-button {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    background: none;
    border: none;
    color: #9aa0a6;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

.settings-body {
    padding: 1.5rem;
    overflow-y: auto;
    color: #bdc1c6;
}

.settings-intro {
    margin: 0 0 2rem;
    font-size: 0.9375rem;
}

.cookie-category {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #3c4043;
}

.cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.category-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
}

.always-on {
    font-size: 0.8125rem;
    color: #9aa0a6;
    background: #3c4043;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.category-details {
    margin-top: 0.75rem;
}

.category-details ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
    color: #9aa0a6;
    font-size: 0.875rem;
}

.category-details li {
    margin: 0.25rem 0;
}

.settings-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #3c4043;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(60, 64, 67, 0.3);
    border-radius: 0 0 8px 8px;
}

.more-info {
    color: #8ab4f8;
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-right {
    display: flex;
    gap: 0.75rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #3c4043;
    transition: .2s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .2s;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background-color: #8ab4f8;
}

input:checked + .slider:before {
    transform: translateX(16px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5rem;
    padding: 0.625rem 1.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

.btn-outline {
    background: none;
    border: 1px solid #5f6368;
    color: #fff;
}

.btn-outline:hover {
    background: rgba(138, 180, 248, 0.08);
    border-color: #8ab4f8;
}

.btn-primary {
    background: #8ab4f8;
    color: #202124;
}

.btn-primary:hover {
    background: #aecbfa;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(138, 180, 248, 0.08);
    color: #8ab4f8;
}

.btn-secondary:hover {
    background: rgba(138, 180, 248, 0.16);
}
/* Mobile optimization */
@media (max-width: 600px) {
  .cookie-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .btn {
    width: 100%;
    min-height: 44px; /* Minimum touch target size */
    padding: 12px 16px;
    font-size: 15px;
  }
  
  #btn-accept-all,
  #btn-save-preferences {
    height: auto;
    line-height: 1.4;
    text-align: center;
  }

  /* Cookie settings modal mobile fix */
  .cookie-settings-modal .footer-right {
    flex-direction: column;
    gap: 12px;
  }
  
  .cookie-settings-modal .btn {
    width: 100%;
    min-height: 44px;
    padding: 12px;
    box-sizing: border-box;
  }
  
  #btn-save-preferences,
  #btn-accept-all-modal {
    height: auto;
    line-height: 1.4;
    text-align: center;
    font-size: 15px;
  }
}

version: '3.9'

services:
  web:
    build: .
    ports:
      - "8000:8000"
    volumes:
      - .:/app
    environment:
      - DJANGO_SETTINGS_MODULE=codice_ateco.settings
    depends_on:
      - db

  db:
    image: postgres:14
    environment:
      POSTGRES_DB: codice_ateco_db
      POSTGRES_USER: codice_ateco_user
      POSTGRES_PASSWORD: your_password
    volumes:
      - postgres_data:/var/lib/postgresql/data

volumes:
  postgres_data:

# Установка зависимостей системы
RUN apt-get update && apt-get install -y libpq-dev && apt-get clean

# Установка рабочей директории
WORKDIR /app

# Копирование файлов проекта
COPY . /app/

# Установка зависимостей Python
RUN pip install --no-cache-dir -r requirements.txt

# Установка переменной окружения для Django
ENV DJANGO_SETTINGS_MODULE=codice_ateco.settings

# Команда для запуска приложения
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "codice_ateco.wsgi:application"]