/**
 * A-OPC Delivery Methods - Unified Frontend CSS
 * Final version for all courier fields on the checkout page.
 */

/* ==========================================================================
   1. Основен контейнер за полетата на куриера (сивата секция)
   ========================================================================== */

.aopc-courier-fields-container {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #f9f9f9;
    margin-top: 10px;
}

.aopc-courier-fields-container h5 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* ==========================================================================
   2. Полета и подредба
   ========================================================================== */

.aopc-courier-fields-container .form-row {
    padding: 0;
    margin-bottom: 2px;
}

.aopc-courier-fields-container .form-row label {
    display: block;
    margin-bottom: 0px;
    margin-top:17px;
    font-weight: 500;
}

.aopc-courier-fields-container .form-row-first {
    width: 48%;
    float: left;
    margin-right: 4%;
}

.aopc-courier-fields-container .form-row-last {
    width: 48%;
    float: right;
    margin-right: 0;
}

.aopc-courier-fields-container .clear {
    clear: both;
}


/* ==========================================================================
   3. Полета за търсене и резултати
   ========================================================================== */

.aopc-courier-fields-container .form-row:has(.aopc-search-input-wrapper),
.aopc-courier-fields-container .form-row:has(.aopc-search-container) {
    margin-bottom: 0;
}

/* --- НАЧАЛО НА ПРОМЯНАТА: Премахваме margin-bottom от самото input поле --- */
/* Този селектор е достатъчно специфичен, за да надделее над стиловете на темата */
.aopc-courier-fields-container .aopc-search-input-wrapper input.input-text,
.aopc-courier-fields-container .aopc-search-container input.input-text {
    margin-bottom: 0;
}
/* --- КРАЙ НА ПРОМЯНАТА --- */

.aopc-search-input-wrapper,
.aopc-search-container {
    position: relative !important;
}

.aopc-speedy-search-results,
.aopc-econt-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-top: none;
    z-index: 10002;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    margin-top: -1px;
    box-sizing: border-box;
}


.aopc-speedy-search-results ul,
.aopc-econt-search-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aopc-speedy-search-results li,
.aopc-econt-search-results li {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9em;
    line-height: 1.4;
}

.aopc-speedy-search-results li:last-child,
.aopc-econt-search-results li:last-child {
    border-bottom: none;
}

.aopc-speedy-search-results li:hover,
.aopc-econt-search-results li:hover {
    background-color: #f5f5f5;
}

.aopc-speedy-search-results .a-opc-info-text,
.aopc-econt-search-results .a-opc-info-text,
.aopc-speedy-search-results .a-opc-error-text,
.aopc-econt-search-results .a-opc-error-text {
    font-style: italic;
    color: #777;
    cursor: default;
}

.aopc-speedy-search-results .a-opc-error-text,
.aopc-econt-search-results .a-opc-error-text {
    color: #d9534f;
    font-weight: bold;
}