/* Advanced Search Anywhere - Frontend CSS Premium UI */

.awas-search-container {
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    width: 100%;
}

.awas-search-form {
    position: relative;
}

.awas-search-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 46px;
}

.awas-search-input-wrapper:focus-within {
    border-color: #777;
    box-shadow: 0 0 0 1px #777;
}

.awas-search-input {
    flex: 1;
    border: none !important;
    padding: 0 15px !important;
    box-shadow: none !important;
    margin: 0 !important;
    font-size: 15px;
    background: transparent !important;
    height: 100%;
}

.awas-search-input:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

.awas-search-clear {
    background: transparent;
    border: none;
    color: #999;
    padding: 0 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 100%;
}

.awas-search-clear:hover {
    color: #333;
}

.awas-search-category-select {
    border-left: 1px solid #ddd;
    border-right: none;
    height: 100%;
    display: flex;
    align-items: center;
    background: #f8f8f8;
}

.awas-cat-dropdown {
    display: block !important;
    border: none !important;
    background: transparent !important;
    padding: 0 30px 0 15px !important;
    box-shadow: none !important;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    height: 100%;
    outline: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 10px auto !important;
}

.awas-search-btn {
    background: #f1f1f1;
    color: #555;
    border: none;
    border-left: 1px solid #ddd;
    padding: 0 15px;
    height: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.awas-search-btn:hover {
    background: #e5e5e5;
}

/* Dropdown styling */
.awas-search-results-dropdown {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    z-index: 99999;
    border-radius: 0 0 4px 4px;
    max-height: 600px;
    overflow-y: auto;
}

.awas-results-list {
    list-style: none;
    margin: 0;
    padding: 0 !important;
}

.awas-result-item {
    border-bottom: 1px solid #eee;
    padding: 15px;
    display: flex;
    position: relative;
    overflow: hidden;
}

.awas-result-item:last-child {
    border-bottom: none;
}

.awas-result-item:hover {
    background: #fcfcfc;
}

.awas-sale-badge {
    position: absolute;
    top: 10px;
    left: -25px;
    background: #76a066;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 25px;
    transform: rotate(-45deg);
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.awas-result-image {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    margin-right: 20px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.awas-result-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
}

.awas-result-details-wrapper {
    flex: 1;
    display: flex;
    justify-content: space-between;
}

.awas-result-info {
    flex: 1;
    padding-right: 15px;
}

.awas-result-title {
    font-weight: 700;
    font-size: 15px;
    color: #222;
    text-decoration: none;
    display: block;
    margin-bottom: 6px;
}

.awas-result-title:hover {
    color: #000;
}

.awas-stock-in {
    color: #68cc68; /* Light green from the mockup */
    font-size: 13px;
    margin-bottom: 6px;
}

.awas-stock-out {
    color: #d9534f;
    font-size: 12px;
    margin-bottom: 4px;
}

.awas-result-sku, .awas-result-desc {
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
    line-height: 1.5;
}

.awas-result-attributes {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

.awas-result-cats {
    font-size: 12px;
    margin-top: 8px;
}

.awas-cat-link {
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}

.awas-cat-link:hover {
    color: #333;
    text-decoration: underline;
}

.awas-result-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    min-width: 110px;
}

.awas-result-price {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    margin-bottom: 10px;
    text-align: right;
}

.awas-result-price del {
    color: #999;
    font-weight: 400;
    font-size: 12px;
    margin-right: 5px;
}

.awas-result-price ins {
    text-decoration: none;
}

.awas-atc-wrapper {
    display: flex;
    align-items: center;
}

.awas-qty-input {
    width: 45px !important;
    height: 30px !important;
    padding: 0 0 0 10px !important;
    border: 1px solid #eee !important;
    background: #f7f7f7 !important;
    margin-right: 5px !important;
    font-size: 13px !important;
    border-radius: 3px !important;
}

.awas-add-to-cart-btn {
    background: #e6e6e6;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 3px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background 0.2s, color 0.2s;
    border: none;
    cursor: pointer;
}

.awas-add-to-cart-btn:hover {
    background: #d4d4d4;
    color: #111;
}

.awas-add-to-cart-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.awas-add-to-cart-btn.added {
    background: #76a066;
    color: #fff;
}

/* Highlight Match */
mark {
    background: transparent;
    color: #000;
    font-weight: 800;
    padding: 0;
}

/* Footer */
.awas-no-results, .awas-error {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.awas-results-footer {
    padding: 12px 15px;
    background: #f9f9f9;
    text-align: center;
    border-top: 1px solid #eee;
}

.awas-results-footer a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.awas-results-footer a:hover {
    text-decoration: underline;
}

/* Spinner */
.awas-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    border-top-color: #555;
    animation: awas-spin 0.8s linear infinite;
}

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

/* Suggestions Dropdown Styles */
.awas-suggestions-wrapper {
    padding: 10px 0;
}

.awas-suggestion-group {
    margin-bottom: 15px;
}

.awas-suggestion-group:last-child {
    margin-bottom: 0;
}

.awas-suggestion-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    padding: 5px 15px;
    letter-spacing: 0.5px;
}

.awas-suggestion-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.awas-suggestion-list li {
    padding: 8px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    color: #444;
    font-size: 14px;
}

.awas-suggestion-list li:hover {
    background: #f5f7f9;
    color: #111;
}

.awas-suggestion-list li .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 10px;
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.awas-dym-link {
    color: #2271b1;
    text-decoration: underline;
    cursor: pointer;
}

/* =========================================
   Layout Styles
========================================= */

/* 1. Modern Cards (Default baseline) */
/* The base CSS is already styled towards modern cards (paddings, shadows, flexbox layout). */

/* 2. Dropdown (Minimalist style) */
.awas-layout-dropdown {
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #ddd;
    border-radius: 4px;
}
.awas-layout-dropdown .awas-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid #f5f5f5;
}
.awas-layout-dropdown .awas-result-item:hover {
    background: #fdfdfd;
}

/* 3. Compact */
.awas-layout-compact .awas-result-item {
    padding: 8px 10px;
}
.awas-layout-compact .awas-result-image {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}
.awas-layout-compact .awas-result-title {
    font-size: 13px;
    margin-bottom: 2px;
}
.awas-layout-compact .awas-result-price {
    font-size: 12px;
}
.awas-layout-compact .awas-add-to-cart-btn {
    padding: 4px 8px;
    font-size: 11px;
}

/* 4. Amazon Style */
.awas-style-amazon .awas-search-input-wrapper {
    border-radius: 4px;
    border: 1px solid #ccc;
    box-shadow: none !important;
}

.awas-style-amazon .awas-search-input-wrapper:focus-within {
    border: 1px solid #ff9900;
    box-shadow: 0 0 0 2px rgba(255,153,0,0.3) !important;
}

.awas-style-amazon .awas-search-category-select {
    background: #f3f3f3;
    border-right: 1px solid #ccc;
    border-left: none;
    border-radius: 4px 0 0 4px;
}

.awas-style-amazon .awas-search-category-select:hover {
    background: #e3e3e3;
}

.awas-style-amazon .awas-search-btn {
    background: #febd69;
    border: none;
    border-radius: 0 4px 4px 0;
    transition: background 0.1s;
}

.awas-style-amazon .awas-search-btn:hover {
    background: #f3a847;
}

.awas-layout-amazon {
    border-radius: 0 0 4px 4px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background: #fff;
    margin-top: 0;
}

.awas-layout-amazon .awas-result-item {
    padding: 6px 15px;
    border-bottom: none;
    display: flex;
    align-items: center;
}

.awas-layout-amazon .awas-result-item:hover {
    background: #f3f3f3;
}

.awas-layout-amazon .awas-result-image {
    width: 25px;
    height: 25px;
    margin-right: 12px;
}

.awas-layout-amazon .awas-result-icon {
    width: 25px;
    height: 25px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.awas-layout-amazon .awas-result-title {
    font-size: 15px;
    color: #111;
    font-weight: 700; /* Bold the unhighlighted part */
    margin: 0;
}

.awas-layout-amazon mark {
    font-weight: 400; /* Normal for the highlighted part */
    color: #111;
}

