/* Стиль кассового чека */
.receipt {
    max-width: 420px;
    width: 100%;
    background: #ffffff;
    font-family: 'Courier New', 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #000000;
    margin: 0 auto;
    padding: 0;
    position: relative;
}

.receipt-body {
    background: #ffffff;
    padding: 12px;
    position: relative;
}

.receipt-label {
    font-weight: bold;
    font-size: 11px;
    letter-spacing: 1px;
    margin-top: 8px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.receipt-value {
    margin-bottom: 2px;
    margin-left: 8px;
    word-break: break-word;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
}

.receipt-divider {
    border-top: 1px dashed #cccccc;
    margin: 8px 0;
}

.receipt-divider-double {
    border-top: 2px solid #000000;
    margin: 8px 0;
}

.receipt-total {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: bold;
    margin: 10px 0;
}

/* Блок предупреждения */
.receipt-warning {
    background: #f8f9fa;
    padding: 8px 12px;
    margin-top: 12px;
    border-top: 1px dashed #999;
    border-bottom: 1px dashed #999;
}

.warning-title {
    font-weight: bold;
    font-size: 10px;
    text-align: center;
    margin-bottom: 6px;
}

.warning-text {
    font-size: 9px;
    text-align: center;
    color: #666;
}

/* Чекбокс */
.receipt-check {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        transition: all 0.2s;
    }
    .receipt-check:hover {
        background: #fff;
        border-color: #dee2e6;
    }

    .receipt-check .form-check-input {
        width: 18px;
        height: 18px;
        margin: 0;
        cursor: pointer;
        flex-shrink: 0;
    }

.receipt-check .form-check-label {
    font-size: 10px;
    font-family: 'Courier New', monospace;
    margin-left: 35px;
    cursor: pointer;
    color: #495057;
    user-select: none;
}

/* ========== КНОПКИ ========== */
.receipt-button {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 12px 12px 12px;
}

/* Основная кнопка оплаты - одинаковый стиль с плавающей */
.btn-pay {
    width: 100%;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
}

.btn-pay:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.btn-pay:active {
    transform: scale(0.98);
}

/* Стиль для disabled кнопки */
.btn-pay:disabled,
.btn-pay.disabled {
    background: linear-gradient(135deg, #adb5bd 0%, #6c757d 100%);
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
    pointer-events: none; /* Блокирует все события мыши */
}

/* Дополнительно: стиль для disabled при наведении */
.btn-pay:disabled:hover,
.btn-pay.disabled:hover {
    transform: none;
    box-shadow: none;
    background: linear-gradient(135deg, #adb5bd 0%, #6c757d 100%);
}

/* Опционально: стиль для enabled состояния с анимацией появления */
.btn-pay:enabled {
    animation: btnPulse 0.3s ease;
}

@keyframes btnPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Кнопка отмены */
.btn-cancel {
    width: 100%;
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-cancel:active {
    transform: scale(0.98);
}

/* ========== ПЛАВАЮЩАЯ КНОПКА ОПЛАТЫ ========== */
#floating-pay-button {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 12px 20px;
    box-shadow: 0 -2px 15px rgba(0,0,0,0.15);
    z-index: 999;
    border-top: 1px solid #e0e0e0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

#floating-pay-button.show {
    transform: translateY(0);
}

.btn-floating-pay {
    width: 100%;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
}

.btn-floating-pay:active {
    transform: scale(0.98);
}

/* ========== АДАПТИВ ========== */
/* Мобильная версия */
@media (max-width: 768px) {
    .receipt {
        max-width: 100%;
        margin: 0;
    }

    .receipt-body {
        padding: 10px;
    }

    #floating-pay-button {
        bottom: 60px;
    }

    #order_common {
        margin-bottom: 80px;
    }
}

/* Десктоп версия */
@media (min-width: 769px) {
    .receipt-button {
        flex-direction: row;
        justify-content: space-between;
    }

    .btn-pay {
        width: auto;
        flex: 2;
        margin-right: 10px;
    }

    .btn-cancel {
        width: auto;
        flex: 1;
    }

    #floating-pay-button {
        display: none !important;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .receipt {
        max-width: 100%;
        margin: 0;
    }

    .receipt-body {
        padding: 10px;
    }
}

/* Зубчики по краям */
.receipt::before,
.receipt::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(90deg, #fff, #fff 8px, #ddd 8px, #ddd 16px);
    pointer-events: none;
}

.receipt::before {
    top: -3px;
}

.receipt::after {
    bottom: -3px;
}