/* Restaurant Reviews Map - CSS Styles */

#restaurant-reviews-map-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100% !important;
    height: 85vh !important;
    min-height: 700px !important;
    max-width: 1600px !important;
    margin: 0 auto !important;
}

.rrm-layout {
    display: flex;
    height: 100% !important;
    min-height: 600px !important;
    position: relative;
}

/* Doporučené restaurace - Projidlo shortcode */
.projidlo-recommended-section {
    background: transparent;
    color: #1f2937;
    padding: 20px 0;
    margin: 20px 0;
}

.projidlo-recommended-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.projidlo-recommended-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: #1f2937;
}

.projidlo-recommended-header p {
    margin: 10px 0 0 0;
    font-size: 16px;
    color: #6b7280;
    font-weight: 400;
}

.projidlo-recommended-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.projidlo-recommended-item {
    background: white;
    border-radius: 12px;
    padding: 0;
    text-align: left;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.projidlo-recommended-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #3b82f6;
}

.projidlo-recommended-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.projidlo-recommended-content {
    padding: 16px;
}

.projidlo-recommended-item h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.projidlo-recommended-item .projidlo-recommended-rating {
    color: #f59e0b;
    font-size: 14px;
    margin: 4px 0;
}

.projidlo-recommended-item .projidlo-recommended-price {
    font-size: 14px;
    color: #6b7280;
    margin: 4px 0;
    font-weight: 500;
}

.projidlo-recommended-item .projidlo-recommended-address {
    font-size: 12px;
    color: #9ca3af;
    margin: 4px 0 8px 0;
}

.projidlo-recommended-item .projidlo-recommended-tag {
    background: #3b82f6;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    display: inline-block;
}

/* Responsive design pro Projidlo doporučené restaurace */
@media (max-width: 1024px) {
    .projidlo-recommended-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .projidlo-recommended-section {
        padding: 20px 15px;
        margin: 15px 0;
    }
    
    .projidlo-recommended-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .projidlo-recommended-header h2 {
        font-size: 24px;
    }
    
    .projidlo-recommended-header p {
        font-size: 14px;
    }
    
    .projidlo-recommended-item {
        padding: 15px;
    }
    
    .projidlo-recommended-item h3 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .projidlo-recommended-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .projidlo-recommended-item {
        padding: 12px;
    }
    
    .projidlo-recommended-item h3 {
        font-size: 14px;
    }
    
    .projidlo-recommended-header h2 {
        font-size: 20px;
    }
}

/* Vyhledávací panel - vlevo */
.rrm-search-panel {
    width: 260px;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    height: 100% !important;
    position: relative;
    z-index: 10;
}

.rrm-search-header {
    background: #007cba;
    color: white;
    padding: 15px;
    text-align: center;
}

.rrm-search-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.rrm-search-form {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

.rrm-search-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.rrm-search-form input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.25);
}

.rrm-search-form button {
    width: 100%;
    padding: 12px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.rrm-search-form button:hover {
    background: #005a87;
}

.rrm-search-form button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Výsledky vyhledávání */
.rrm-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.rrm-section-title {
    background: #007cba;
    color: white;
    padding: 10px 15px;
    font-weight: 600;
    font-size: 14px;
    margin: 0;
}

.rrm-refresh-section {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
}

.rrm-refresh-nearby {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.rrm-refresh-nearby:hover {
    background: #218838;
}

.rrm-location-status {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    text-align: center;
}

.rrm-refresh-location {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-left: 5px;
}

.rrm-refresh-location:hover {
    background: #138496;
}

.rrm-search-result {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background-color 0.2s;
}

.rrm-search-result:hover {
    background: #e9ecef;
}

.rrm-search-result:last-child {
    border-bottom: none;
}

.rrm-result-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.rrm-result-address {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.rrm-result-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rrm-stars {
    color: #ffc107;
    font-size: 14px;
}

.rrm-rating-text {
    font-size: 12px;
    color: #666;
    margin-left: 5px;
}

.rrm-price-level {
    font-size: 12px;
    color: #28a745;
    margin-left: 8px;
    font-weight: 600;
}

.rrm-source-badge {
    font-size: 10px;
    color: #666;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 600;
}

/* Mapa panel - celá stránka */
.rrm-map-panel {
    flex: 1;
    position: absolute;
    top: 0;
    left: 260px;
    right: 0;
    bottom: 0;
    z-index: 1;
    min-height: 600px !important;
}

#restaurant-map {
    width: 100%;
    height: 100%;
    min-height: 600px !important;
}

/* Panel s recenzemi - vpravo */
.rrm-reviews-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100% !important;
    background: white;
    border-left: 1px solid #dee2e6;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 600px !important;
}

.rrm-reviews-header {
    background: #1f2937;
    color: white;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    flex-shrink: 0;
}

.rrm-restaurant-photos {
    width: 100%;
    display: flex;
    gap: 2px;
    background: #111827;
}

.rrm-restaurant-photo {
    flex: 1;
    height: 150px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.rrm-restaurant-photo:hover {
    transform: scale(1.05);
    z-index: 1;
}

/* Navigační tlačítka pod fotkami */
.rrm-navigation-buttons {
    display: flex;
    gap: 8px;
    padding: 15px;
    background: #1f2937;
    flex-wrap: wrap;
    justify-content: center;
}

.rrm-nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #374151;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid #4b5563;
    min-width: 100px;
    justify-content: center;
}

.rrm-nav-btn:hover {
    background: #4b5563;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.rrm-nav-btn:active {
    transform: translateY(0);
}

.rrm-nav-icon {
    font-size: 16px;
}

.rrm-nav-maps {
    background: #3b82f6;
    border-color: #2563eb;
}

.rrm-nav-maps:hover {
    background: #2563eb;
}

.rrm-nav-website {
    background: #10b981;
    border-color: #059669;
}

.rrm-nav-website:hover {
    background: #059669;
}

.rrm-nav-search {
    background: #f59e0b;
    border-color: #d97706;
    color: #1f2937;
}

.rrm-nav-search:hover {
    background: #d97706;
    color: #1f2937;
}

.rrm-reviews-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    color: white;
    padding: 15px;
    background: #1f2937;
}

#close-reviews {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    z-index: 10;
}

#close-reviews:hover {
    background: rgba(255,255,255,0.2);
}

.rrm-reviews-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.rrm-details-header {
    background: #007cba;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rrm-details-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

#close-details {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#close-details:hover {
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
}

.rrm-details-content {
    padding: 20px;
}

/* Hodnocení */
.rrm-rating-summary {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rrm-overall-rating {
    text-align: center;
    margin-bottom: 20px;
}

.rrm-overall-rating .rrm-stars {
    font-size: 24px;
    margin-right: 10px;
}

.rrm-overall-rating .rrm-rating-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.rrm-rating-breakdown {
    display: flex;
    justify-content: space-around;
}

.rrm-source-rating {
    text-align: center;
}

.rrm-source {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 600;
}

.rrm-source-rating .rrm-stars {
    font-size: 16px;
}

.rrm-source-rating .rrm-rating-text {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

/* Recenze */
.rrm-reviews-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.rrm-reviews-count {
    background: #e9ecef;
    color: #666;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.rrm-api-limit-info {
    background: #fff3cd;
    color: #856404;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 11px;
    margin-bottom: 15px;
    border: 1px solid #ffeaa7;
}

.rrm-api-limit-info a {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
}

.rrm-api-limit-info a:hover {
    text-decoration: underline;
}

.rrm-loading-more {
    background: #f8f9fa;
    color: #666;
    padding: 15px;
    text-align: center;
    font-size: 12px;
    border-radius: 4px;
    margin: 10px 0;
    border: 1px solid #e9ecef;
}

.rrm-loading-more::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

.rrm-no-more-reviews {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    text-align: center;
    font-size: 12px;
    border-radius: 4px;
    margin: 10px 0;
    border: 1px solid #c3e6cb;
}

.rrm-load-more-section {
    text-align: center;
    margin: 15px 0;
    padding: 10px 0;
}

.rrm-load-more-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.rrm-load-more-btn:hover {
    background: #005a87;
}

.rrm-load-more-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.rrm-review {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.rrm-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.rrm-review-author {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.rrm-review-source {
    font-size: 12px;
    color: #666;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rrm-review-likes {
    font-size: 11px;
    color: #999;
    margin-left: 8px;
}

.rrm-review-likes::before {
    content: "👍 ";
}

.rrm-review-photos {
    margin: 8px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.rrm-review-photo {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.rrm-review-photo:hover {
    transform: scale(1.1);
}

.rrm-review-rating {
    margin-bottom: 8px;
}

.rrm-review-text {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.rrm-review-date {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* Fotky v recenzích */
.rrm-review-photos {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rrm-review-photo {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.rrm-review-photo:hover {
    transform: scale(1.05);
}

/* Loading states */
.rrm-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.rrm-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error states */
.rrm-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
    border: 1px solid #f5c6cb;
}

/* Responsive design */
@media (max-width: 768px) {
    #restaurant-reviews-map-container {
        height: auto !important;
        min-height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .rrm-layout {
        flex-direction: column;
        height: auto !important;
        min-height: auto !important;
        position: relative;
        width: 100% !important;
    }
    
    .rrm-search-panel {
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        position: relative !important;
        z-index: 10;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        flex-shrink: 0;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .rrm-search-header {
        width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
    }
    
    .rrm-search-form {
        width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
        box-sizing: border-box;
    }
    
    .rrm-search-form input {
        width: 100% !important;
        box-sizing: border-box;
        margin: 0 0 15px 0 !important;
    }
    
    .rrm-search-form button {
        width: 100% !important;
        box-sizing: border-box;
    }
    
    .rrm-search-results {
        max-height: 250px;
        overflow-y: auto;
        background: white;
        width: 100% !important;
    }
    
    .rrm-search-result {
        padding: 15px 20px;
        border-bottom: 1px solid #e9ecef;
        cursor: pointer;
        transition: background-color 0.2s;
        font-size: 14px;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    .rrm-search-result:hover {
        background: #f8f9fa;
    }
    
    .rrm-result-name {
        font-weight: 600;
        color: #333;
        margin-bottom: 8px;
        font-size: 16px;
    }
    
    .rrm-result-address {
        font-size: 14px;
        color: #666;
        margin-bottom: 10px;
        line-height: 1.4;
    }
    
    .rrm-result-rating {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 5px;
    }
    
    .rrm-stars {
        color: #ffc107;
        font-size: 16px;
    }
    
    .rrm-rating-text {
        font-size: 14px;
        color: #666;
        font-weight: 600;
    }
    
    .rrm-map-panel {
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        height: 40vh !important;
        min-height: 250px !important;
        flex-shrink: 0;
        z-index: 1;
        width: 100% !important;
    }
    
    #restaurant-map {
        min-height: 250px !important;
        width: 100% !important;
    }
    
    .rrm-reviews-panel {
        width: 100% !important;
        height: 40vh !important;
        min-height: 250px !important;
        position: relative !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
        border-left: none;
        border-top: 1px solid #dee2e6;
        box-shadow: none;
        z-index: 5;
        flex-shrink: 0;
    }
}

/* Střední tablety */
@media (max-width: 1024px) and (min-width: 769px) {
    .rrm-search-panel {
        width: 220px;
        background: white;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    }
    
    .rrm-search-results {
        max-height: 400px;
    }
    
    .rrm-search-result {
        padding: 18px;
    }
    
    .rrm-result-name {
        font-size: 15px;
    }
    
    .rrm-result-address {
        font-size: 13px;
    }
    
    .rrm-map-panel {
        left: 220px;
    }
    
    .rrm-reviews-panel {
        width: 260px;
    }
    
    /* Navigační tlačítka na tabletu */
    .rrm-navigation-buttons {
        padding: 12px;
        gap: 6px;
    }
    
    .rrm-nav-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 80px;
    }
}

/* Pro větší obrazovky - ještě širší mapa */
@media (min-width: 1200px) {
    .rrm-search-panel {
        width: 240px;
    }
    
    .rrm-map-panel {
        left: 240px;
    }
    
    .rrm-reviews-panel {
        width: 280px;
    }
}

@media (max-width: 480px) {
    #restaurant-reviews-map-container {
        height: auto !important;
        min-height: auto !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .rrm-layout {
        width: 100% !important;
    }
    
    .rrm-search-panel {
        height: auto !important;
        min-height: auto !important;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .rrm-search-header {
        width: 100% !important;
        padding: 15px !important;
        margin: 0 !important;
    }
    
    .rrm-search-header h3 {
        font-size: 18px;
        margin: 0;
    }
    
    .rrm-search-form {
        width: 100% !important;
        padding: 15px !important;
        margin: 0 !important;
        box-sizing: border-box;
    }
    
    .rrm-search-form input {
        font-size: 16px; /* Zabrání zoomu na iOS */
        padding: 12px;
        border: 2px solid #e9ecef;
        border-radius: 8px;
        margin: 0 0 12px 0 !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    .rrm-search-form input:focus {
        border-color: #007cba;
        box-shadow: 0 0 0 3px rgba(0,124,186,0.1);
    }
    
    .rrm-search-form button {
        padding: 12px;
        font-size: 16px;
        border-radius: 8px;
        font-weight: 700;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    .rrm-search-results {
        max-height: 200px;
        background: white;
        width: 100% !important;
    }
    
    .rrm-search-result {
        padding: 12px 15px;
        font-size: 13px;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    .rrm-result-name {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .rrm-result-address {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .rrm-stars {
        font-size: 14px;
    }
    
    .rrm-rating-text {
        font-size: 13px;
    }
    
    .rrm-map-panel {
        height: 35vh !important;
        min-height: 200px !important;
        width: 100% !important;
    }
    
    #restaurant-map {
        min-height: 200px !important;
        width: 100% !important;
    }
    
    .rrm-reviews-panel {
        height: 35vh !important;
        min-height: 200px !important;
        width: 100% !important;
    }
    
    .rrm-restaurant-details {
        height: 60%;
    }
    
    .rrm-rating-breakdown {
        flex-direction: column;
        gap: 10px;
    }
    
    .rrm-reviews-content {
        padding: 15px;
    }
    
    /* Navigační tlačítka na mobilu */
    .rrm-navigation-buttons {
        padding: 12px;
        gap: 6px;
        flex-direction: column;
    }
    
    .rrm-nav-btn {
        width: 100%;
        min-width: auto;
        padding: 12px;
        font-size: 15px;
    }
    
    .rrm-nav-icon {
        font-size: 18px;
    }
}
