/**
 * Nova Poshta Module CSS
 */

/* Warehouse type filter (branch / postomat) */
.np-warehouse-type-filter {
    --np-accent: #3bb273; /* colour of the selected option */
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 20px;
    margin: 15px 0 0;
}

.np-warehouse-type-filter .np-type-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
    margin: 0;
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    font-size: 15px;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
}

.np-warehouse-type-filter .np-type-radio {
    position: relative;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 2px solid #b5b3c7;
    border-radius: 50%;
    background: #fff;
    transition: border-color .15s, border-width .15s;
}

.np-warehouse-type-filter .np-type-option:hover .np-type-radio {
    border-color: var(--np-accent);
}

.np-warehouse-type-filter .np-type-option.is-active .np-type-radio {
    border: 2px solid var(--np-accent);
}

.np-warehouse-type-filter .np-type-option.is-active .np-type-radio::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: var(--np-accent);
}

.np-warehouse-type-filter .np-type-option:focus {
    outline: none;
}

.np-warehouse-type-filter .np-type-option:focus-visible .np-type-radio {
    box-shadow: 0 0 0 3px rgba(59, 178, 115, .35);
}

/* Warehouse Selector Styles */
.novapost-warehouse-selector {
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 15px 0;
}

.novapost-warehouse-selector h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.novapost-warehouse-selector .form-group {
    margin-bottom: 15px;
}

.novapost-warehouse-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.novapost-warehouse-selector select,
.novapost-warehouse-selector input {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.novapost-warehouse-selector .dropdown-container {
    position: relative;
    width: 100%;
}

.novapost-warehouse-selector .city-dropdown,
.novapost-warehouse-selector .warehouse-dropdown {
    display: none;
    position: absolute;
    width: 100%;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.novapost-warehouse-selector .city-dropdown div,
.novapost-warehouse-selector .warehouse-dropdown div {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.novapost-warehouse-selector .city-dropdown div:hover,
.novapost-warehouse-selector .warehouse-dropdown div:hover {
    background: #f1f1f1;
}

.novapost-warehouse-selector .city-dropdown div:last-child,
.novapost-warehouse-selector .warehouse-dropdown div:last-child {
    border-bottom: none;
}

.novapost-warehouse-selector input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.novapost-warehouse-selector input:not([readonly]) {
    cursor: pointer;
}