/* Импорт переменных */
@import url('variables.css');

.login-block input, .registration-block input {
    background-color: #292929 !important;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 0.75rem;
}

/* Выбор типа пользователя */
.pick-user-checkbox {
    position: relative;
    cursor: pointer;
    min-width: 170px;
    text-align: center;
    user-select: none;
    border-color: var(--primary-orange) !important;
    color: var(--primary-orange) !important;
    background-color: transparent !important;
    border-radius: var(--border-radius-md) !important;
    transition: all var(--transition-base) !important;
}

/* Скрываем нативные радио-кнопки */
.pick-user-checkbox input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.pick-user-block .pick-user-checkbox:last-child label {
    padding-left: 23px !important;
    white-space: nowrap;
}

/* Кастомный квадратик для галочки */
.pick-user-checkbox label::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 2px solid var(--primary-orange);
    border-radius: 4px;
    background-color: transparent;
    transition: all 0.2s;
    z-index: 1;
}

/* Галочка при выборе */
.pick-user-checkbox input[type="radio"]:checked + label::after {
    content: '✓';
    position: absolute;
    left: -1px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
    z-index: 1;
}

/* Заливка квадратика при выборе */
.pick-user-checkbox input[type="radio"]:checked + label::before {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
}

/* Стили для текста */
.pick-user-checkbox label {
    cursor: pointer;
    margin: 0;
    display: block;
    font-weight: 500;
    color: #bf9125;
    z-index: 1;
    position: relative;
}

/* Активное состояние - меняем фон всей кнопки */
.pick-user-checkbox input[type="radio"]:checked ~ label {
    color: var(--primary-orange);
}

/* Ховер эффект */
.pick-user-checkbox:hover {
    background-color: rgba(253, 126, 20, 0.08) !important;
    box-shadow: 0 4px 8px rgba(253, 126, 20, 0.2);
}

/* Для выравнивания в flex контейнере */
.pick-user-block .pick-user-checkbox {
    flex: 1;
    margin: 0 5px;
}

.pick-user-block .pick-user-checkbox:first-child {
    margin-left: 0;
}

.pick-user-block .pick-user-checkbox:last-child {
    margin-right: 0;
}

/* Компонент: Статистическая карточка */
.stat-row {
    align-content: space-between;
}

.stat-card {
    transition: transform var(--transition-base);
    padding: var(--spacing-lg);
    text-align: center;
    height: 110px;
}

.stat-card:hover {
    transform: translateY(-5px) !important;
}

.stat-card .stat-number {
    font-size: var(--font-size-3xl) !important;
    font-weight: var(--font-weight-bold) !important;
    margin-bottom: var(--spacing-sm);
}

.stat-card p {
    color: white;
}

/* Компонент: Карточка заказа */
.order-card {
    /*cursor: pointer;*/
    height: 100%;
    transition: all var(--transition-base);
}

.order-card:hover {
    border-color: var(--primary-orange) !important;
    box-shadow: 0 5px 15px rgba(255, 167, 38, 0.1) !important;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.order-card-title {
    font-size: var(--font-size-lg) !important;
    font-weight: var(--font-weight-semibold) !important;
    margin-bottom: var(--spacing-sm);
}

.order-card-price {
    font-size: var(--font-size-xl) !important;
    font-weight: var(--font-weight-bold) !important;
    color: var(--primary-orange);
}

/* Компонент: Чат */
.chat-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    overflow: hidden;
    height: calc(100vh - 70px);
    min-height: 600px;
}

.chat-sidebar {
    background-color: rgba(0,0,0,0.2);
    border-right: 1px solid var(--border-color);
    height: 100%;
    overflow-y: auto;
}

.chat-main {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    max-width: 70%;
}

.message.incoming {
    align-self: flex-start;
}

.message.outgoing {
    align-self: flex-end;
}

.message-content {
    padding: 0.75rem 1rem;
    border-radius: 18px;
    background-color: var(--message-incoming-bg);
    color: var(--text-primary);
    word-wrap: break-word;
}

.message.outgoing .message-content {
    background-color: var(--message-outgoing-bg);
    border: 1px solid var(--accent);
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.message-time i {
    color: var(--accent);
    font-size: 0.8rem;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0,0,0,0.2);
}

.chat-input {
    background-color: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 24px;
    padding: 0.75rem 1rem;
}

.chat-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,167,38,0.2);
}

.chat-send-btn {
    background-color: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat-send-btn i {
    font-size: 21px;
    margin-right: 2px;
    margin-top: 2px;
    width: 40px;
}

.chat-send-btn:hover {
    background-color: #ff9800;
}

.dialog-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.dialog-item:hover {
    background-color: rgba(255,167,38,0.1);
}

.dialog-item.active {
    background-color: rgba(255,167,38,0.2);
    border-left: 3px solid var(--accent);
}

.dialog-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--bg-primary);
    margin-left: 2.4px;
    margin-right: 12px;
}

.dialog-item.active .dialog-avatar {
    margin-left: 0;
}

.dialog-info {
    flex: 1;
    min-width: 0;
}

.dialog-name {
    font-weight: 600;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    justify-content: space-between;
}

.dialog-last-message {
    display: inline-flex;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dialog-last-message i {
    color: var(--accent);
}

.dialog-meta {
    display: flex;
    align-items: flex-end;
    margin-left: 8px;
}

.dialog-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.dialog-unread {
    background-color: var(--accent);
    color: var(--bg-primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    margin-right: 5px;
}

.date-separator {
    text-align: center;
    margin: 10px 0;
    position: relative;
}

.date-separator span {
    background-color: var(--bg-card);
    padding: 0 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

.date-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border-color);
    z-index: 0;
}

.back-to-list {
    display: none;
}

@media (max-width: 768px) {
    .chat-content-wrapper, .chat-container {
        height: calc(100vh - 125px);
    }

    .chat-sidebar {
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: 10;
        background-color: var(--bg-card);
        transition: transform 0.3s;
    }

    .chat-sidebar.hide {
        transform: translateX(-100%);
    }

    .chat-main {
        width: 100%;
    }

    .dialog-item.active {
        background-color: transparent;
        border-left: none;
    }

    .chat-messages {
        max-height: calc(100vh - 274px);
    }

    .back-to-list {
        display: block;
        margin-right: 10px;
        cursor: pointer;
    }
}

/* Компонент: Модальное окно */
.modal-custom .modal-content {
    background-color: var(--secondary-dark);
    border: 1px solid rgba(255, 167, 38, 0.2);
}

.modal-custom .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-custom .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Компонент: Таблица */
.table-custom {
    color: rgba(255, 255, 255, 0.87);
    background-color: var(--secondary-dark);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.table-custom th {
    background-color: rgba(255, 167, 38, 0.1);
    color: var(--primary-orange);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md);
}

.table-custom td {
    padding: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-custom tr:hover {
    background-color: rgba(255, 167, 38, 0.05) !important;
}

/* Компонент: Индикатор загрузки */
.loader {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 167, 38, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-orange);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Компонент: Уведомление */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-md);
    background-color: var(--secondary-dark);
    border-left: 4px solid var(--primary-orange);
    box-shadow: var(--shadow-lg);
    z-index: 1050;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    border-left-color: var(--success-green);
}

.notification.error {
    border-left-color: var(--warning-red);
}

.notification.warning {
    border-left-color: #FFC107;
}

@media (min-width: 768px) {

    .stat-row > div {
        padding-right: 0 !important;
    }

    .stat-row > div:nth-child(2n) {
        padding: 0;
        padding-right: 12px !important;
    }
}

.drone-add-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 20px;
}

.drone-add-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.2);
}

.drone-add-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.drone-add-section:last-child {
    border-bottom: none;
}

.drone-add-section-title {
    color: var(--accent);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.drone-add-section-title i {
    margin-right: 10px;
}

.drone-add-logo-preview {
    width: 200px;
    min-height: 200px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--accent);
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.drone-add-logo-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.drone-add-logo-upload input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.drone-add-form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.drone-add-form-label .required, .required {
    color: var(--profile-danger);
}

.drone-add-form-control, .drone-add-form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 0.75rem;
}

.drone-add-form-control:focus, .drone-add-form-select:focus {
    background-color: #292929 !important;
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.25rem rgba(255, 167, 38, 0.25);
}

.drone-add-form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.drone-add-form-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.drone-add-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.drone-add-btn-primary {
    background-color: var(--accent);
    color: var(--bg-primary);
}

.drone-add-btn-primary:hover {
    background-color: #ff9800;
    color: var(--bg-primary);
}

.drone-add-btn-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.drone-add-btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.drone-add-btn-danger {
    background-color: transparent;
    color: var(--profile-danger);
    border: 1px solid var(--profile-danger);
}

.drone-add-btn-danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.drone-add-btn-success {
    background-color: var(--profile-success);
    color: white;
}

.drone-add-btn-success:hover {
    background-color: #157347;
    color: white;
}

.drone-add-actions {
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.drone-add-characteristics-list {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.drone-add-characteristic-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drone-add-characteristic-item:last-child {
    border-bottom: none;
}

.drone-add-docs-container {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.drone-add-doc-item {
    background-color: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drone-add-doc-item:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .drone-add-section {
        padding: 1rem;
    }

    .drone-add-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .drone-add-actions .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .drone-add-logo-preview {
        width: 150px;
        min-height: 150px;
    }

    .drone-add-characteristic-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .drone-add-characteristic-item input {
        margin-top: 0.5rem;
        width: 100%;
    }
}

.drone-photo-slide {
    max-height: 300px;
    object-fit: contain;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.thumbnail-container {
    position: relative;
    width: 80px;
    height: 60px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
}

.thumbnail-container.active {
    border-color: var(--accent);
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    padding: 2px 5px;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.thumbnail-container:hover .thumbnail-remove-btn {
    opacity: 1;
}

.carousel-caption {
    border-radius: 4px;
    padding: 5px 10px;
    right: 10px;
    left: auto;
    bottom: 10px;
    width: auto;
    z-index: 10;
}

.carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FFA726'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FFA726'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.carousel-control-next-icon, .carousel-control-prev-icon {
    width: 40px;
    height: 40px;
}

.carousel-control-next, .carousel-control-prev, .carousel-control-next:focus, .carousel-control-prev:focus  {
    opacity: 1 !important;
}

.thumbnail-remove-btn {
    display: none !important;
}

@media (min-width: 768px) {
    .carousel-control-next-icon:hover, .carousel-control-prev-icon:hover  {
        filter: drop-shadow(0 0 3px orange);
    }
}

table .badge {
    color: black;
}

.chat-container {
    height: calc(100vh - 78px) !important;
}

.form-select:disabled {
    background-color: unset;
}

.btn-warning {
    --bs-btn-bg: var(--primary-orange) !important;
}

.companyName {
    font-size: 24px;
}