/* Popup Overlay */
#pobPopup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#pobPopup.pob-show {
    display: flex;
    opacity: 1;
}

/* Popup Content */
.pob-popup-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    animation: pobSlideIn 0.3s ease;
}

@keyframes pobSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.pob-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 5px 10px;
    transition: color 0.2s;
}

.pob-close-btn:hover {
    color: #333;
}

/* Heading */
.pob-popup-content h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
}

/* Search Box */
.pob-search-box {
    margin-bottom: 15px;
}

#pobSearchInput {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

#pobSearchInput:focus {
    border-color: #0073aa;
}

/* Loading */
.pob-loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

/* Results */
.pob-results {
    overflow-y: auto;
    max-height: 400px;
    flex-grow: 1;
}

.pob-result-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.pob-result-item:hover {
    background: #f9f9f9;
}

.pob-result-item:last-child {
    border-bottom: none;
}

.pob-medicine-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.pob-medicine-name {
    flex-grow: 1;
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.pob-add-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
    flex-shrink: 0;
}

.pob-add-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
}

.pob-add-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Empty State */
.pob-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

/* Search Button */
.pob-search-button-wrapper {
    margin: 10px 0;
    text-align: left;
    /* Changed from center to align with standard WP themes */
    clear: both;
    /* Prevents floating issues */
    width: 100%;
}

.pob-search-trigger {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: inline-block;
}

.pob-search-trigger:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.pob-shortcode-btn {
    margin: 5px 0;
}

/* Hidden Price */
.pob-hidden-price {
    color: #999;
    font-style: italic;
}

/* Delivery Notice */
.pob-delivery-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.pob-delivery-notice strong {
    display: block;
    margin-bottom: 5px;
}

/* --- NEW STYLES: Fake Search Bar (Replica) --- */
.pob-fake-search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 50px; /* Full pill shape */
    padding: 4px;
    width: 100%;
    max-width: 100%; /* Adapts to container */
    box-sizing: border-box;
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s;
    /* Override standard trigger styles since this is a container */
    color: inherit;
    text-align: left;
    position: relative;
    min-height: 48px; 
}

.pob-fake-search-bar:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-color: #ccc;
    background: #fff; /* Ensure it stays white */
    transform: none; /* Disable lift on the whole bar */
}

/* The input-like text area */
.pob-fake-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    color: #555 !important;
    outline: none !important;
    cursor: pointer; /* Pointer to indicate it's clickable */
    box-shadow: none !important;
}

/* The Red Button on the right */
.pob-fake-submit {
    width: 40px;
    height: 40px;
    background: #e60023; /* Bright Red */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-right: 2px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.pob-fake-submit:hover {
    background: #ad001a;
}

.pob-fake-submit svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5px;
}

/* Responsive */
@media (max-width: 600px) {
    .pob-popup-content {
        width: 95%;
        padding: 20px;
        max-height: 95vh;
    }

    .pob-popup-content h2 {
        font-size: 20px;
    }

    .pob-medicine-img {
        width: 40px;
        height: 40px;
    }

    .pob-add-btn {
        padding: 6px 15px;
        font-size: 13px;
    }
}
