/**
 * POS Advertising Module - Public Styles
 * 
 * @package POS_Advertising
 */

/* Reset & Base Styles */
.pos-ads-page {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Common Elements */
.button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.button-primary {
    background: #2563eb;
    color: white;
}

.button-primary:hover {
    background: #1d4ed8;
}

.button-secondary {
    background: white;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.button-secondary:hover {
    background: #f0f9ff;
}

/* Verified Badge */
.verified-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    margin-left: 8px;
}

.unverified-badge {
    display: inline-block;
    background: #gray-400;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    margin-left: 8px;
}

/* Directory Styles */
.pos-ads-directory {
    min-height: 100vh;
    background: #f9fafb;
}

.directory-header {
    background: white;
    padding: 40px 20px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.directory-header h1 {
    font-size: 2.5em;
    margin: 0 0 10px 0;
    color: #111827;
}

.directory-subtitle {
    font-size: 1.1em;
    color: #6b7280;
    margin-bottom: 30px;
}

.directory-search {
    max-width: 600px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1em;
}

.search-button {
    padding: 12px 24px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.search-button:hover {
    background: #1d4ed8;
}

/* Active Filters Bar */
.active-filters-bar {
    display: none;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 15px auto 0;
    padding: 10px 15px;
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: 0.9em;
}

.active-filters-bar span {
    color: #1e40af;
    font-weight: 600;
}

.clear-filters-link {
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
}

.clear-filters-link:hover {
    text-decoration: underline;
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 20px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    width: 100%;
    position: relative;
}

.filter-count-badge {
    position: absolute;
    right: 15px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
}

.directory-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    padding: 30px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Sidebar Filters */
.directory-sidebar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mobile-filter-close {
    display: none;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
}

.filters-title {
    margin: 0;
    font-size: 1.2em;
}

.filter-group {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e5e7eb;
}

.filter-group:last-of-type {
    border-bottom: none;
}

.filter-heading {
    margin: 0 0 12px 0;
    font-size: 0.95em;
    font-weight: 600;
    color: #374151;
}

.filter-checkbox {
    display: block;
    padding: 6px 0;
    cursor: pointer;
}

.filter-checkbox input {
    margin-right: 8px;
}

.filter-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-button {
    width: 100%;
    padding: 10px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.filter-reset {
    text-align: center;
    color: #6b7280;
    text-decoration: none;
}

/* Results */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-count {
    font-size: 1.1em;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

/* Organization Cards */
.organizations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.org-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e5e7eb;
    position: relative;
}

.org-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Featured Organization Highlight */
.org-card.featured-org {
    border: 2px solid #10b981;
}

.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #10b981;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.org-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.org-card-logo {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    padding: 20px;
}

.org-card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.org-card-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: bold;
}

.org-card-content {
    padding: 20px;
}

.org-card-name {
    font-size: 1.3em;
    margin: 0 0 10px 0;
}

.org-card-rating {
    margin: 10px 0;
    font-size: 0.9em;
}

.rating-stars {
    font-size: 1.1em;
}

.rating-value {
    font-weight: 600;
    margin: 0 5px;
}

.rating-count {
    color: #6b7280;
}

.org-card-location {
    color: #6b7280;
    margin: 10px 0;
    font-size: 0.95em;
}

.org-card-hours {
    color: #6b7280;
    margin: 8px 0;
    font-size: 0.9em;
}

.org-card-description {
    color: #4b5563;
    margin: 15px 0;
    line-height: 1.5;
}

.org-card-cta {
    color: #2563eb;
    font-weight: 600;
}

/* Quick Action Buttons */
.org-card-actions {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px 20px;
    border-top: 1px solid #f3f4f6;
    padding-top: 15px;
}

.action-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.2s;
}

.action-button:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.call-button:hover {
    background: #10b981;
    border-color: #10b981;
}

.email-button:hover {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

.action-icon {
    font-size: 1.1em;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Pagination */
.directory-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
}

.pagination-prev,
.pagination-next {
    padding: 10px 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    font-weight: 600;
}

.pagination-info {
    color: #6b7280;
}

/* Organization Detail */
.pos-ads-org-detail {
    min-height: 100vh;
}

.org-hero {
    height: 400px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: white;
}

.org-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px auto;
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.org-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.org-name {
    font-size: 2.5em;
    margin: 0 0 20px 0;
}

.hero-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Quick Info Bar */
.org-quick-info {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 30px 0;
}

.quick-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.quick-info-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.info-icon {
    font-size: 1.5em;
}

.info-content {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.85em;
    color: #6b7280;
}

.info-value {
    font-weight: 600;
    color: #111827;
}

/* Sections */
.org-section {
    padding: 60px 0;
    border-bottom: 1px solid #e5e7eb;
}

.section-title {
    font-size: 2em;
    margin: 0 0 30px 0;
    color: #111827;
}

.section-content p {
    font-size: 1.1em;
    line-height: 1.8;
    color: #4b5563;
}

/* Mission & Vision */
.mission-vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.mission-box,
.vision-box {
    background: #f9fafb;
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

/* Specialties */
.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.specialty-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.specialty-name {
    margin: 0 0 10px 0;
    color: #2563eb;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

.gallery-caption {
    margin-top: 8px;
    font-size: 0.9em;
    color: #6b7280;
}

/* Reviews */
.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.reviews-summary {
    text-align: center;
}

.rating-large {
    font-size: 3em;
    font-weight: bold;
    color: #2563eb;
}

.review-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.verified-reviewer {
    color: #10b981;
    font-size: 0.85em;
    font-weight: 600;
}

.review-date {
    color: #6b7280;
    font-size: 0.9em;
    margin-top: 15px;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-item {
    margin-bottom: 25px;
}

.contact-item h3 {
    margin: 0 0 10px 0;
    color: #374151;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.social-link {
    padding: 8px 16px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
}

#org-map {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* Responsive */
@media (max-width: 768px) {
    .directory-content {
        grid-template-columns: 1fr;
        padding: 20px 15px;
    }
    
    /* Show mobile filter toggle */
    .mobile-filter-toggle {
        display: flex;
    }
    
    /* Show active filters bar on mobile */
    .active-filters-bar {
        display: flex;
    }
    
    /* Mobile sidebar */
    .directory-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        overflow-y: auto;
        z-index: 1000;
        transition: left 0.3s ease;
        border-radius: 0;
    }
    
    .directory-sidebar.active {
        left: 0;
        box-shadow: 4px 0 12px rgba(0,0,0,0.15);
    }
    
    .mobile-filter-close {
        display: block;
    }
    
    /* Backdrop */
    .directory-sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: -1;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .org-hero {
        height: 300px;
    }
    
    .org-name {
        font-size: 1.8em;
    }
    
    .organizations-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-button {
        width: 100%;
    }
    
    .directory-header h1 {
        font-size: 2em;
    }
}
