/* Viajario 0.13.3 · refresco global, modal de actividad y recuperación segura */

.global-refresh-button {
    position: fixed;
    z-index: 320;
    right: 18px;
    bottom: 18px;
    min-height: 44px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    background: #061857;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 7px;
    box-shadow: 0 10px 30px rgba(2, 10, 40, .28);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.global-refresh-button:hover,
.global-refresh-button:focus-visible {
    color: #fff;
    background: #eb6255;
    transform: translateY(-1px);
}

.global-refresh-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.activity-dialog {
    position: fixed;
    z-index: 300;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.activity-dialog.is-open,
.activity-dialog:target {
    display: flex;
}

.activity-dialog-backdrop {
    position: absolute;
    inset: 0;
    display: block;
    background: rgba(2, 10, 40, .68);
    backdrop-filter: blur(3px);
}

.activity-dialog-panel {
    position: relative;
    z-index: 1;
    width: min(780px, 100%);
    max-height: calc(100dvh - 36px);
    overflow-y: auto;
    color: #202637;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 28px 80px rgba(2, 10, 40, .38);
    overscroll-behavior: contain;
}

.activity-dialog .plan-panel-header {
    position: sticky;
    z-index: 3;
    top: 0;
}

.activity-dialog .activity-expense-editor {
    display: block !important;
    padding: 22px;
    background: #fff4f1;
    border-bottom: 2px solid #eb6255;
}

.activity-expense-open {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    background: #eb6255;
    border: 0;
    border-radius: 7px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.plan-title-button { text-decoration: none; }

.plan-edit-button {
    margin-left: auto;
    padding: 6px;
    flex: 0 0 auto;
    color: #697386;
    background: transparent;
    border: 0;
    border-radius: 7px;
    font-weight: 900;
    letter-spacing: .08em;
    text-decoration: none;
}

.plan-edit-button:hover,
.plan-edit-button:focus-visible {
    color: #fff;
    background: #061857;
}

.activity-dialog-close,
.activity-dialog-close:hover,
.activity-dialog-close:focus-visible {
    min-width: 94px;
    color: #fff;
    background: #061857;
    border: 0;
    border-radius: 7px;
    text-decoration: none;
}

.activity-dialog .activity-data-form {
    padding: 20px;
}

.rate-limit-card {
    max-width: 640px;
    margin: 40px auto;
    padding: 28px;
}

.rate-limit-card h1 { margin: 8px 0 12px; }
.rate-limit-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 720px) {
    .global-refresh-button {
        right: 12px;
        bottom: calc(82px + env(safe-area-inset-bottom));
        width: 46px;
        height: 46px;
        padding: 0;
    }

    .global-refresh-button span { display: none; }

    .activity-dialog { padding: 8px; }

    .activity-dialog-panel {
        width: 100%;
        max-height: calc(100dvh - 16px);
        border-radius: 10px;
    }

    .activity-dialog .activity-expense-editor,
    .activity-dialog .activity-data-form { padding: 16px 14px; }

    .activity-dialog-close { min-width: 86px; }
}
