/**
 * Стили специфичные для главной страницы (index.html)
 */

/* Заголовки */
.page-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 10px;
}

.page-subtitle {
    color: #666;
    margin-bottom: 20px;
}

/* Карточка устройств */
.devices-card {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    width: fit-content;
    min-width: 400px;
}

.device-card-header {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.device-card-title {
    font-size: 16px;
    font-weight: 500;
}

.device-status {
    display: flex;
    align-items: center;
    gap: 5px;
}

.device-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.device-status-indicator.green {
    background-color: #4caf50;
}

.device-status-indicator.red {
    background-color: #f44336;
}

.device-card-content {
    padding: 20px;
}

/* Нет устройств */
.no-devices {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
}

.no-devices-icon {
    width: 38px;
    height: 38px;
    background-image: url('../assets/images/no-devices.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 10px;
    opacity: 0.8;
}

.no-devices p {
    color: #666;
    margin: 10px 0;
}

.add-device-btn {
    background-color: #2196f3;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-weight: 500;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.add-device-btn:hover {
    background-color: #1976d2;
}

.add-device-btn.highlight {
    animation: buttonPulse 2s infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(33, 150, 243, 0);
    }
}

/* Popup подсказка */
.popup {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    transform: translateY(-10px);
    z-index: 1100;
}

.popup.active {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.popup-content {
    position: relative;
    background-color: #fff;
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 10px;
}

.popup-arrow {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}

.popup-text {
    color: #333;
    font-size: 14px;
    white-space: nowrap;
}

/* Popup выбора процесса */
.warehouse-popup {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background-color: #FFD7D7;
    border: 2px solid #993535;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 30px;
    max-width: 480px;
    width: 90%;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s, visibility 0.5s, transform 0.5s;
}

.warehouse-popup.active {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.warehouse-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #993535;
    color: white;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.warehouse-popup-close:hover {
    background-color: #7a2a2a;
}

.warehouse-popup-content {
    display: flex;
    flex-direction: column;
    padding-right: 30px;
}

.warehouse-popup-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    padding-right: 10px;
}

.warehouse-popup-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
}

.warehouse-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 180px;
}

.warehouse-btn {
    padding: 12px 20px;
    background-color: #993535;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.2s;
}

.warehouse-btn:hover {
    background-color: #7a2a2a;
    transform: translateY(-2px);
}

.warehouse-popup-flex img {
    max-width: 220px;
    width: 100%;
    height: auto;
}

/* Подсвеченные элементы sidebar */
.sidebar-item.highlighted {
    animation: sidebarHighlight 1.5s ease-in-out infinite;
}

@keyframes sidebarHighlight {
    0%, 100% {
        background-color: #fff;
    }
    50% {
        background-color: #fff3e0;
    }
}

