/* Стили для аутентификации и оформления заказа */

.auth {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth a {
    color: #0099ff;
    text-decoration: none;
    font-size: 14px;
}

.auth a:hover {
    color: #0095d8;
    text-decoration: underline;
}

.auth span {
    color: #666;
    font-size: 14px;
}

.logout-link {
    color: #f54040 !important;
}

/* Стили для форм */
.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.form-section h3 {
    color: #0099ff;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error, .alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert-warning {
    background-color: #dc3545 !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
    font-weight: bold !important;
}

/* Стили для полей ввода */
.input-box-cart {
    position: relative;
    margin-bottom: 20px;
}

.input-box-cart label {
    position: absolute;
    top: 12px;
    left: 19px;
    color: #8b8b8b;
    font-size: 14px;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 2;
    background: #fff;
    padding: 0 5px;
}

.input-box-cart.focus label,
.input-box-cart input:focus + label,
.input-box-cart textarea:focus + label {
    top: -8px;
    font-size: 12px;
    color: #0099ff;
}

.input-box-cart input,
.input-box-cart textarea {
    width: 100%;
    padding: 12px 19px;
    border: 2px solid #d6dbe0;
    border-radius: 8px;
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

.input-box-cart input:focus,
.input-box-cart textarea:focus {
    border-color: #0099ff;
    outline: none;
}

.input-box-cart textarea {
    resize: vertical;
    min-height: 80px;
}

/* Стили для кнопок */
.btn-b {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.btn-b.green {
    background-color: #4CAF50;
    color: white;
}

.btn-b.green:hover {
    background-color: #45a049;
    color: white;
}

.btn-b.blue {
    background-color: #0099ff;
    color: white;
}

.btn-b.blue:hover {
    background-color: #008fee;
    color: white;
}

.btn-b:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.buttons-row {
    margin-top: 30px;
    text-align: center;
}

.buttons-row .btn-b {
    margin: 0 10px;
}

/* Стили для ссылок аутентификации */
.auth-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #d6dbe0;
}

.auth-links a {
    color: #0099ff;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Стили для радио-кнопок */
.cart-radio-box {
    padding: 20px;
    margin-bottom: 10px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-radio-box:hover {
    border-color: #e0e0e0;
}

.cart-radio-box.selected {
    border-color: #0099ff;
    background-color: #f0f8ff;
}

.cart-radio-box label.radio {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.cart-radio-box label.radio .title {
    font-weight: 600;
    color: #333;
}

.cart-radio-box label.radio .cost {
    color: #4CAF50;
    font-weight: 600;
}

/* Стили для товаров в заказе */
.cart-product-small {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.cart-product-small:last-child {
    border-bottom: none;
}

.cart-product-small .thumb {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    flex-shrink: 0;
}

.cart-product-small .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.cart-product-small .data {
    flex: 1;
}

.cart-product-small .name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.cart-product-small .quantity {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.cart-product-small .price {
    font-size: 16px;
    font-weight: 600;
    color: #0099ff;
}

/* Стили для layout страниц аутентификации */
.auth-layout {
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

.auth-layout .col-lg-6 {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 50% !important;
    float: none !important;
    position: relative !important;
}

/* Принудительное горизонтальное расположение для всех разрешений */
.row.auth-layout {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    margin: 0 !important;
}

.row.auth-layout > [class*="col-"] {
    float: none !important;
    position: relative !important;
    flex: 1 !important;
    width: 50% !important;
    max-width: 50% !important;
}

.auth-form {
    background: #fff;
    border: 1px solid #e1e8ec;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: fit-content;
}

.auth-form:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.auth-form .title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

.auth-benefits {
    height: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Улучшенные стили для полей ввода в форме входа */
.auth-form .input-box-cart {
    margin-bottom: 25px;
}

.auth-form .input-box-cart input {
    height: 50px;
    font-size: 16px;
    border-radius: 10px;
    border: 2px solid #e1e8ec;
    transition: all 0.3s ease;
}

.auth-form .input-box-cart input:focus {
    border-color: #0099ff;
    box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.1);
}

.auth-form .input-box-cart label {
    font-size: 14px;
    font-weight: 500;
}

.auth-form .buttons-row {
    margin-top: 35px;
}

.auth-form .btn-b.blue {
    width: 100%;
    height: 50px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    background: linear-gradient(135deg, #0099ff 0%, #008fee 100%);
    box-shadow: 0 4px 12px rgba(0, 153, 255, 0.3);
    transition: all 0.3s ease;
}

.auth-form .btn-b.blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 153, 255, 0.4);
}

.auth-links {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ec;
    text-align: center;
}

.auth-links p {
    margin: 0;
    color: #5a6c7d;
    font-size: 14px;
}

.auth-links a {
    color: #0099ff;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #008fee;
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 768px) {
    .auth-layout {
        flex-direction: row !important; /* Всегда горизонтально */
        gap: 15px;
        flex-wrap: wrap !important;
    }
    
    .auth-layout .col-lg-6 {
        width: 48% !important;
        min-width: 280px;
        flex: 1 !important;
    }
    
    .auth-form {
        padding: 20px;
    }
    
    .auth-form .title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .auth-form .input-box-cart input {
        height: 45px;
        font-size: 14px;
    }
    
    .auth-form .btn-b.blue {
        height: 45px;
        font-size: 14px;
    }
    
    .auth-benefits {
        order: -1; /* Блок преимуществ будет сверху на мобильных */
    }
}

/* Очень маленькие экраны - вертикальное расположение */
@media (max-width: 480px) {
    .auth-layout {
        flex-direction: column !important;
        gap: 20px;
    }
    
    .auth-layout .col-lg-6 {
        width: 100% !important;
        min-width: auto;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .buttons-row .btn-b {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
    
    .auth {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .cart-radio-box {
        padding: 15px;
    }
    
    .cart-radio-box label.radio {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* =================== СТАТИЧНЫЕ ПОДПИСИ ДЛЯ ФОРМ РЕГИСТРАЦИИ =================== */
.auth-form .input-box-cart label {
    display: block !important;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    position: static !important;
    transform: none !important;
    transition: none !important;
    opacity: 1 !important;
    background: none !important;
    padding: 0 !important;
    pointer-events: auto !important;
}

.auth-form .input-box-cart {
    margin-bottom: 20px;
}

.auth-form .input-box-cart input {
    margin-top: 0 !important;
    padding: 12px 16px !important;
    border: 2px solid #e1e8ec !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    transition: border-color 0.3s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.auth-form .input-box-cart input:focus {
    border-color: #0099ff !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.1) !important;
}

.auth-form .input-box-cart input:hover {
    border-color: #0099ff !important;
}
