/* ============================================
   Warehouse Module — Custom Styles
   ============================================ */

/* --- Header --- */
.wh-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.wh-header-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--akcenti);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--cvet-na-akcente, #fff);
    flex-shrink: 0;
}

.wh-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wh-header-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--glavnyy-tekst);
    line-height: 1.2;
}

.wh-header-sub {
    font-size: 13px;
    color: var(--vtorostepennyy-tekst);
    font-weight: 500;
}

/* --- Container --- */
.wh-container {
    background: var(--bloki);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--box-shadow);
}

/* --- Grid --- */
.wh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

/* --- Empty state --- */
.wh-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--vtorostepennyy-tekst);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.wh-empty i {
    font-size: 48px;
    opacity: 0.4;
}

.wh-empty span {
    font-size: 16px;
    font-weight: 500;
}

/* --- Slot card --- */
.wh-slot {
    background: var(--cvet-vnutri-bloka);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wh-slot:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.wh-slot-img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    object-position: center;
    transition: transform 0.25s ease;
    display: block;
    padding: 8px;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
}

.wh-slot-img.need-transform {
    object-fit: contain;
    transform: rotate(-40deg);
    padding: 10px;
}

.wh-slot-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wh-slot-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--glavnyy-tekst);
    margin-bottom: 6px;
    line-height: 1.3;
}

.wh-slot-desc {
    font-size: 13px;
    color: var(--vtorostepennyy-tekst);
    line-height: 1.4;
    margin-bottom: 12px;
    flex: 1;
}

.wh-slot-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wh-slot-badges {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* --- Time badge --- */
.wh-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bloki);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--vtorostepennyy-tekst);
    white-space: nowrap;
}

.wh-badge i {
    font-size: 14px;
}

.wh-badge--expire {
    background: rgba(229, 63, 63, 0.15);
    color: #e53f3f;
}

/* --- Activate button --- */
.wh-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s all;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.wh-btn-primary {
    background: var(--akcenti);
    color: var(--cvet-na-akcente, #fff);
}

.wh-btn-primary:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.wh-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* --- Modal --- */
.wh-modal .modal-content {
    background: var(--bloki);
    border: none;
    border-radius: 14px;
    overflow: hidden;
}

.wh-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--cvet-vnutri-bloka);
}

.wh-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--glavnyy-tekst);
    display: flex;
    align-items: center;
    gap: 10px;
}

.wh-modal-title i {
    font-size: 22px;
    background: var(--akcenti);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wh-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--cvet-vnutri-bloka);
    border: none;
    color: var(--vtorostepennyy-tekst);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s all;
}

.wh-modal-close:hover {
    color: var(--glavnyy-tekst);
}

.wh-modal-body {
    padding: 24px;
}

/* --- Modal form --- */
.wh-form-group {
    margin-bottom: 18px;
}

.wh-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--vtorostepennyy-tekst);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.wh-select,
.wh-input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: var(--cvet-vnutri-bloka);
    color: var(--glavnyy-tekst);
    font-size: 15px;
    font-weight: 500;
    transition: 0.2s all;
    outline: none;
    box-sizing: border-box;
}

.wh-select:focus,
.wh-input:focus {
    border-color: var(--akcenti);
}

.wh-input::placeholder {
    color: var(--vtorostepennyy-tekst);
    opacity: 0.6;
}

/* --- Result block --- */
#activateResult {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    margin-top: 16px;
    display: none;
}

#activateResult a {
    color: inherit !important;
    text-decoration: underline;
}

#activateResult.success {
    display: block;
    background: rgba(45, 227, 45, 0.15);
    color: #2de32d;
    border: 1px solid rgba(45, 227, 45, 0.2);
}

#activateResult.failure {
    display: block;
    background: rgba(229, 63, 63, 0.15);
    color: #e53f3f;
    border: 1px solid rgba(229, 63, 63, 0.2);
}

/* --- Prompt (confirmation) --- */
.promptResult {
    font-size: 14px;
    color: var(--glavnyy-tekst);
    margin-top: 16px;
    line-height: 1.6;
}

.buttonsGroup {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.buttonsGroup button {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.2s all;
}

.buttonsGroup .acceptButton {
    background: var(--akcenti);
    color: var(--cvet-na-akcente, #fff);
}

.buttonsGroup .acceptButton:hover {
    opacity: 0.85;
}

.buttonsGroup .rejectButton {
    background: var(--cvet-vnutri-bloka);
    color: var(--glavnyy-tekst);
}

.buttonsGroup .rejectButton:hover {
    opacity: 0.8;
}

/* --- Close timer --- */
.closeTimerBlock {
    display: none;
    margin-top: 16px;
    font-size: 13px;
    color: var(--vtorostepennyy-tekst);
}

.closeTimerBlock.show {
    display: block;
}

/* --- Modal activate button --- */
.activateSlot {
    margin-top: 16px;
    padding: 11px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s all;
    border: none;
    background: var(--akcenti);
    color: var(--cvet-na-akcente, #fff);
    min-width: 200px;
}

.activateSlot:hover {
    opacity: 0.85;
}

.activateSlot:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .wh-header-title {
        font-size: 18px;
    }

    .wh-header-icon {
        width: 46px;
        height: 46px;
        font-size: 22px;
        border-radius: 12px;
    }

    .wh-container {
        padding: 16px;
    }

    .wh-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .wh-slot-img {
        height: 120px;
    }

    .wh-slot-body {
        padding: 12px;
    }

    .wh-slot-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .wh-modal-body {
        padding: 16px;
    }
}
