/**
 * Frontend Public Stylesheet for PartnerPilot
 * Designed to inherit default theme typography/colors,
 * with customizations defined in appearance settings.
 */

.partnerpilot-container {
    width: 100%;
    margin: 20px auto;
    font-family: inherit;
    box-sizing: border-box;
}

.partnerpilot-container * {
    box-sizing: border-box;
}

/* 1. Modern Premium Search Bar Styles */
.partnerpilot-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 35px auto;
    display: flex;
    align-items: center;
    border-radius: 9999px;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
    border: 1.5px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.partnerpilot-search-wrapper:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06), 0 2px 10px rgba(0, 0, 0, 0.03);
}

.partnerpilot-search-wrapper:focus-within {
    border-color: #f58220; /* Orange branding accent color */
    box-shadow: 0 0 0 4px rgba(245, 130, 32, 0.15), 0 8px 30px rgba(245, 130, 32, 0.06);
}

.partnerpilot-search-input {
    width: 100% !important;
    height: 54px !important;
    padding: 12px 50px 12px 58px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    border: none !important;
    border-radius: 9999px !important;
    outline: none !important;
    background-color: transparent !important;
    color: #1e293b !important;
    font-family: inherit !important;
    transition: all 0.2s ease !important;
}

.partnerpilot-search-input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.partnerpilot-search-icon-wrapper {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.partnerpilot-search-svg {
    width: 20px;
    height: 20px;
    color: #94a3b8;
    transition: color 0.3s ease;
}

.partnerpilot-search-wrapper:focus-within .partnerpilot-search-svg {
    color: #f58220;
}

.partnerpilot-clear-search-btn {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    color: #94a3b8;
    transition: all 0.2s ease;
    outline: none;
}

.partnerpilot-clear-search-btn:hover {
    background-color: #f1f5f9;
    color: #475569;
}

.partnerpilot-clear-svg {
    width: 16px;
    height: 16px;
}

/* 2. Category Carousel Styles */
.partnerpilot-categories-wrapper {
    position: relative;
    margin-bottom: 35px;
    display: flex;
    align-items: center;
    width: 100%;
}

.partnerpilot-categories-wrapper.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.partnerpilot-categories-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    width: 100%;
    padding: 5px 2px 10px 2px;
    -webkit-overflow-scrolling: touch;
}

/* Hide Scrollbar */
.partnerpilot-categories-carousel::-webkit-scrollbar {
    display: none;
}
.partnerpilot-categories-carousel {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Category Card Styling */
.partnerpilot-category-card {
    flex: 0 0 auto;
    min-width: 150px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.partnerpilot-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

.partnerpilot-category-card.active {
    border-color: #ef922a;
    box-shadow: 0 4px 12px rgba(239, 146, 42, 0.15);
}

.partnerpilot-category-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.partnerpilot-category-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.2;
}

.partnerpilot-category-count {
    font-size: 12px;
    color: #64748b;
}

/* Slider Navigation Arrows */
.partnerpilot-slider-arrow {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #1e293b;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s, color 0.2s, opacity 0.2s;
    font-size: 14px;
}

.partnerpilot-slider-arrow:hover {
    background: #f8fafc;
    color: #0f172a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.partnerpilot-slider-arrow.prev {
    left: -20px;
}

.partnerpilot-slider-arrow.next {
    right: -20px;
}

.partnerpilot-slider-arrow.disabled {
    opacity: 0;
    pointer-events: none;
}

/* 3. Business Card Styles */
.partnerpilot-business-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.partnerpilot-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 15px;
}

.partnerpilot-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    background: #fafafa;
    border-radius: 8px;
    overflow: hidden;
}

.partnerpilot-logo-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
}

.partnerpilot-business-name {
    margin: 5px 0 0 0;
    line-height: 1.3;
}

.partnerpilot-business-slogan {
    text-align: center;
    margin: 0 0 20px 0;
    line-height: 1.5;
    flex-grow: 1;
}

/* Action Buttons Grid */
.partnerpilot-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    margin-top: auto;
}

.partnerpilot-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
}

/* Grid Filter Transition Classes */
.partnerpilot-business-card.filtered-out {
    opacity: 0;
    transform: scale(0.9);
    position: absolute;
    pointer-events: none;
    width: 0;
    height: 0;
    overflow: hidden;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

/* No Results Views */
.partnerpilot-no-results,
.partnerpilot-no-search-results {
    width: 100%;
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    font-size: 16px;
}

/* Responsive Touch & Mobile Arrow Adjustments */
@media (max-width: 980px) {
    .partnerpilot-slider-arrow.prev {
        left: -10px;
    }
    .partnerpilot-slider-arrow.next {
        right: -10px;
    }
}

@media (max-width: 640px) {
    .partnerpilot-slider-arrow {
        width: 34px;
        height: 34px;
        font-size: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    }
    .partnerpilot-slider-arrow.prev {
        left: -4px;
    }
    .partnerpilot-slider-arrow.next {
        right: -4px;
    }
}
