/**
 * Google Place Card - Nowy Design (Tailwind-inspired)
 * Version: 2.0.0
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Kontener dla wielu wizytówek */
.gpc-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin: 30px 0;
    justify-content: center;
}

/* Szerokość kart - max 420px, wyśrodkowanie ostatniej gdy nieparzysta liczba */
.gpc-card {
    width: 100%;
    max-width: 420px;
    flex: 0 0 420px;
}

@media (max-width: 900px) {
    .gpc-card {
        flex: 0 0 100%;
        max-width: 420px;
    }
}

/* Reset i podstawy karty */
.gpc-card {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.gpc-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.gpc-card * {
    box-sizing: border-box;
}

/* Błąd */
.gpc-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 16px 20px;
    border-radius: 12px;
    border-left: 4px solid #dc2626;
    margin: 20px auto;
    max-width: 420px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

/* Nagłówek */
.gpc-header {
    padding: 24px 24px 8px 24px;
}

.gpc-header-inner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.gpc-thumbnail {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gpc-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gpc-header-content {
    flex: 1;
    min-width: 0;
}

.gpc-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.3;
    color: #1e293b;
}

.gpc-type {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

/* Ocena inline */
.gpc-rating-inline {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gpc-rating-value {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.gpc-stars {
    display: flex;
    gap: 1px;
    color: #facc15;
    font-size: 12px;
}

.gpc-star-empty {
    color: #e2e8f0;
}

.gpc-reviews-count {
    font-size: 12px;
    color: #94a3b8;
    margin-left: 4px;
}

.gpc-reviews-link {
    text-decoration: none;
    transition: color 0.2s;
}

.gpc-reviews-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Sekcja statusu i godzin */
.gpc-status-section {
    padding: 8px 24px;
}

.gpc-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.gpc-status-dot {
    position: relative;
    width: 12px;
    height: 12px;
}

.gpc-status-dot-ping {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.75;
    animation: gpc-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.gpc-status-dot-inner {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Status otwarty */
.gpc-status.gpc-open .gpc-status-dot-ping {
    background: #4ade80;
}
.gpc-status.gpc-open .gpc-status-dot-inner {
    background: #22c55e;
}

/* Status zamknięty */
.gpc-status.gpc-closed .gpc-status-dot-ping {
    background: #f87171;
}
.gpc-status.gpc-closed .gpc-status-dot-inner {
    background: #ef4444;
}

.gpc-status-text {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

.gpc-status-next {
    font-weight: 400;
    color: #94a3b8;
}

@keyframes gpc-ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Rozwijane godziny otwarcia */
.gpc-hours-details {
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gpc-hours-details[open] {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.gpc-hours-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    transition: color 0.2s;
}

.gpc-hours-summary:hover {
    color: #0f172a;
}

.gpc-hours-summary::-webkit-details-marker {
    display: none;
}

.gpc-hours-icon {
    color: #94a3b8;
    margin-right: 8px;
}

.gpc-hours-chevron {
    color: #94a3b8;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.gpc-hours-details[open] .gpc-hours-chevron {
    transform: rotate(180deg);
}

.gpc-hours-list {
    padding: 0 16px 16px 16px;
    border-top: 1px solid #f1f5f9;
}

.gpc-hours-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.gpc-day {
    color: #64748b;
}

.gpc-time {
    color: #1e293b;
    font-weight: 500;
}

.gpc-hours-row.gpc-closed-day {
    opacity: 0.5;
}

.gpc-hours-row.gpc-today {
    background: #eef2ff;
    color: #4f46e5;
    padding: 8px;
    margin: 0 -8px;
    border-radius: 8px;
}

.gpc-hours-row.gpc-today .gpc-day,
.gpc-hours-row.gpc-today .gpc-time {
    color: #4f46e5;
    font-weight: 600;
}

/* Informacje kontaktowe */
.gpc-info {
    padding: 8px 24px;
}

.gpc-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 12px;
    transition: background 0.2s;
    text-decoration: none;
}

.gpc-info-item:hover {
    background: #f8fafc;
}

.gpc-info-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.gpc-info-item:hover .gpc-info-icon {
    background: #eef2ff;
    color: #4f46e5;
}

.gpc-info-text {
    font-size: 14px;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.gpc-info-item:hover .gpc-info-text {
    color: #0f172a;
}

/* Przyciski akcji */
.gpc-actions {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
    padding: 24px;
    padding-top: 16px;
}

.gpc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.gpc-btn:active {
    transform: scale(0.95);
}

.gpc-btn-primary {
    background: #4f46e5;
    color: white;
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.25);
}

.gpc-btn-primary:hover {
    background: #4338ca;
    color: white;
}

.gpc-btn-secondary {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.gpc-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #4f46e5;
}

.gpc-btn i {
    font-size: 14px;
}

/* Stopka karty */
.gpc-footer {
    padding: 12px 24px !important;
    background: #f8fafc !important;
    text-align: center !important;
    border-top: 1px solid #f1f5f9 !important;
}

.gpc-footer .gpc-footer-line {
    font-size: 11px !important;
    color: #94a3b8 !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gpc-footer .gpc-footer-line.gpc-disclaimer {
    margin-top: 4px !important;
    font-style: italic !important;
    color: #b8c5d3 !important;
}

/* Mobile */
@media (max-width: 480px) {
    .gpc-card {
        border-radius: 20px;
    }
    
    .gpc-header {
        padding: 20px 20px 8px 20px;
    }
    
    .gpc-status-section,
    .gpc-info {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .gpc-actions {
        padding: 20px;
        grid-template-columns: 1fr 1fr;
    }
    
    .gpc-btn-primary {
        grid-column: span 2;
    }
}

/* Font Awesome Icons (fallback jeśli nie ma FA) */
.gpc-icon-clock::before { content: "🕐"; }
.gpc-icon-chevron::before { content: "▼"; font-size: 10px; }
.gpc-icon-location::before { content: "📍"; }
.gpc-icon-phone::before { content: "📞"; }
.gpc-icon-globe::before { content: "🌐"; }
.gpc-icon-directions::before { content: "🧭"; }
