/**
 * InPost Geowidget - Frontend Checkout Styles
 * @package BossOfToys_Manager
 * @since 3.23.0
 */

/* Wrapper przy metodzie dostawy */
.bot-geowidget-wrapper {
    margin-top: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Przycisk wyboru paczkomatu */
.bot-geowidget-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #ffcd00;
    color: #000;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bot-geowidget-btn:hover {
    background: #ffc107;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 205, 0, 0.3);
}

.bot-geowidget-btn:active {
    transform: translateY(0);
}

.bot-geowidget-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Zmien paczkomat - mniejszy styl */
.bot-change-point {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    font-size: 13px;
    padding: 8px 12px;
}

.bot-change-point:hover {
    background: #f5f5f5;
    box-shadow: none;
}

/* Wybrany punkt */
.bot-selected-point {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    border: 2px solid #ffcd00;
}

.bot-point-icon {
    font-size: 24px;
    line-height: 1;
}

.bot-point-info {
    flex: 1;
}

.bot-point-info strong {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
}

.bot-point-info small {
    display: block;
    font-size: 12px;
    color: #666;
}

/* Modal z Geowidget */
.bot-geowidget-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.bot-geowidget-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.bot-geowidget-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #ffcd00;
    border-bottom: 1px solid #ffc107;
}

.bot-geowidget-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

.bot-geowidget-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #000;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.bot-geowidget-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.bot-geowidget-modal-body {
    flex: 1;
    overflow: hidden;
}

#bot-geowidget-container {
    width: 100%;
    height: 600px;
    max-height: calc(90vh - 80px);
}

#bot-geowidget-container inpost-geowidget {
    width: 100%;
    height: 100%;
}

/* Loading spinner */
.bot-geowidget-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #666;
}

.bot-geowidget-loading::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top-color: #ffcd00;
    border-radius: 50%;
    animation: bot-spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes bot-spin {
    to { transform: rotate(360deg); }
}

/* Error state */
.bot-geowidget-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #d63638;
    text-align: center;
    padding: 20px;
}

.bot-geowidget-error::before {
    content: '!';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #fef0f0;
    border: 2px solid #d63638;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Mobile responsywnosc */
@media (max-width: 768px) {
    .bot-geowidget-modal {
        padding: 10px;
    }

    .bot-geowidget-modal-content {
        max-height: 95vh;
        border-radius: 8px;
    }

    .bot-geowidget-modal-header {
        padding: 12px 16px;
    }

    .bot-geowidget-modal-header h3 {
        font-size: 16px;
    }

    #bot-geowidget-container {
        height: 500px;
        max-height: calc(95vh - 60px);
    }

    .bot-geowidget-wrapper {
        padding: 10px;
    }

    .bot-geowidget-btn {
        width: 100%;
        justify-content: center;
    }

    .bot-selected-point {
        flex-direction: column;
        gap: 8px;
    }
}

/* Ukryj wrapper gdy metoda nie wymaga paczkomatu */
.bot-geowidget-wrapper.hidden {
    display: none;
}

/* Animacja pojawienia sie */
.bot-geowidget-modal.show {
    animation: bot-fadeIn 0.2s ease;
}

.bot-geowidget-modal.show .bot-geowidget-modal-content {
    animation: bot-slideIn 0.3s ease;
}

@keyframes bot-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bot-slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Focus states dla dostepnosci */
.bot-geowidget-btn:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.bot-geowidget-close:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}
