/*
Theme Name: Vacation Exchange
Theme URI: https://changevacation.01sh.ru/
Author: Vacation Exchange
Description: Minimal service theme for the Vacation Exchange WordPress plugin.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
Text Domain: vacation-exchange-theme
*/

:root {
    --vet-page: #f3f5f7;
    --vet-page-2: #ffffff;
    --vet-text: #1d252f;
    --vet-muted: #667085;
    --vet-border: #dfe4ea;
    --vet-panel: rgba(255, 255, 255, 0.86);
    --vet-accent: #d71920;
    --vet-accent-dark: #a80f16;
    --vet-shadow: rgba(16, 24, 40, 0.09);
}

html.vet-dark {
    --vet-page: #171b22;
    --vet-page-2: #2a303a;
    --vet-text: #f4f7fb;
    --vet-muted: #b5c0cf;
    --vet-border: rgba(255, 255, 255, 0.16);
    --vet-panel: rgba(255, 255, 255, 0.09);
    --vet-accent: #ff3b44;
    --vet-accent-dark: #ff6b72;
    --vet-shadow: rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    background:
        radial-gradient(circle at 12% 10%, rgba(215, 25, 32, 0.1), transparent 28%),
        radial-gradient(circle at 88% 4%, rgba(29, 37, 47, 0.08), transparent 26%),
        linear-gradient(145deg, var(--vet-page-2) 0%, var(--vet-page) 56%, #e8edf2 100%);
    color: var(--vet-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    min-height: 100vh;
}

html.vet-dark body {
    background:
        radial-gradient(circle at 12% 10%, rgba(215, 25, 32, 0.24), transparent 28%),
        radial-gradient(circle at 88% 4%, rgba(255, 255, 255, 0.08), transparent 26%),
        linear-gradient(145deg, #11151b 0%, var(--vet-page-2) 54%, #0d1015 100%);
}

a {
    color: var(--vet-accent);
}

.vet-page {
    display: grid;
    min-height: 100vh;
    grid-template-rows: auto 1fr auto;
}

.vet-header,
.vet-footer {
    margin: 0 auto;
    width: min(100%, 1120px);
}

.vet-header {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 22px clamp(14px, 3vw, 28px) 8px;
}

.vet-brand {
    color: var(--vet-text);
    display: inline-flex;
    gap: 10px;
    align-items: center;
    font-weight: 800;
    outline: none;
    text-decoration: none;
}

.vet-brand:focus,
.vet-brand:focus-visible,
.vet-brand:hover {
    outline: none;
    text-decoration: none;
}

.vet-mark {
    align-items: center;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
    display: inline-flex;
    height: 64px;
    justify-content: center;
    overflow: hidden;
    outline: 0 !important;
    padding: 0;
    width: 64px;
}

.vet-mark img {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    display: block;
    height: 100%;
    object-fit: contain;
    outline: 0 !important;
    width: 100%;
}

.vet-header-actions {
    align-items: center;
    display: flex;
    gap: 14px;
}

.vet-theme-toggle {
    align-items: center;
    background: var(--vet-panel);
    border: 0;
    border-radius: 999px;
    color: var(--vet-text);
    cursor: pointer;
    display: inline-flex;
    gap: 9px;
    min-height: 36px;
    padding: 5px 11px 5px 6px;
}

html.vet-dark .vet-theme-toggle {
    border: 1px solid var(--vet-border);
}

.vet-theme-toggle-track {
    background: #d9dee6;
    border-radius: 999px;
    display: inline-flex;
    height: 24px;
    padding: 3px;
    width: 44px;
}

.vet-theme-toggle-thumb {
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.22);
    height: 18px;
    transform: translateX(0);
    transition: transform 0.18s ease, background-color 0.18s ease;
    width: 18px;
}

.vet-theme-toggle-text {
    font-size: 13px;
    font-weight: 650;
}

html.vet-dark .vet-theme-toggle-track {
    background: #d71920;
}

html.vet-dark .vet-theme-toggle-thumb {
    transform: translateX(20px);
}

.vet-header-note,
.vet-footer {
    color: var(--vet-muted);
    font-size: 13px;
}

.vet-main {
    width: 100%;
}

.vet-shell {
    margin: 0 auto;
    padding: 0 clamp(10px, 2vw, 24px) 28px;
    width: min(100%, 1120px);
}

.vet-plugin-missing {
    background: var(--vet-panel);
    border: 0;
    border-radius: 8px;
    box-shadow: 0 24px 70px var(--vet-shadow);
    backdrop-filter: blur(18px);
    margin: 40px auto;
    max-width: 720px;
    padding: 22px;
}

html.vet-dark .vet-plugin-missing {
    border: 1px solid var(--vet-border);
}

.vet-plugin-missing h1 {
    font-size: 26px;
    line-height: 1.2;
    margin: 0 0 10px;
}

.vet-plugin-missing p {
    color: var(--vet-muted);
    margin: 0;
}

.vet-footer {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 10px clamp(14px, 3vw, 28px) 24px;
    opacity: 0.82;
}

.vet-nz-logo {
    align-items: center;
    background: rgba(255, 255, 255, 0.88);
    border: 0;
    border-radius: 8px;
    color: #1d252f;
    display: inline-flex;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    padding: 10px 14px;
    text-transform: uppercase;
}

.vet-nz-logo img {
    display: block;
    height: auto;
    max-height: 110px;
    max-width: 430px;
    object-fit: contain;
}

html.vet-dark .vet-nz-logo {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.vet-nz-mark {
    background: var(--vet-accent);
    border-radius: 6px;
    color: #ffffff;
    display: inline-flex;
    font-size: 11px;
    justify-content: center;
    min-width: 30px;
    padding: 4px 6px;
}

@media (max-width: 640px) {
    .vet-header {
        align-items: flex-start;
        flex-direction: column;
        padding-top: 14px;
    }

    .vet-header-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .vet-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .vet-mark {
        height: 56px;
        width: 56px;
    }

    .vet-nz-logo img {
        max-height: 76px;
        max-width: min(86vw, 300px);
    }

    .vet-shell {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Vacation Exchange plugin UI */
.ve-app {
            --ve-border: #dfe4ea;
            --ve-border-strong: #c7d0da;
            --ve-muted: #667085;
            --ve-bg: #f3f5f7;
            --ve-panel: rgba(255, 255, 255, 0.9);
            --ve-panel-soft: #f8fafc;
            --ve-accent: #d71920;
            --ve-accent-dark: #a80f16;
            --ve-accent-soft: rgba(215, 25, 32, 0.1);
            --ve-good: #16794c;
            --ve-warn-bg: #fff7df;
            --ve-warn-border: #efd48a;
            color: #1d252f;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
            font-size: 15px;
            isolation: isolate;
            line-height: 1.5;
            margin: clamp(18px, 4vw, 44px) auto;
            max-width: none;
            padding: clamp(14px, 2.2vw, 24px);
            width: min(100%, 1040px);
        }

        html.vet-dark .ve-app {
            --ve-border: rgba(255, 255, 255, 0.16);
            --ve-border-strong: rgba(255, 255, 255, 0.28);
            --ve-muted: #b5c0cf;
            --ve-bg: rgba(17, 21, 27, 0.5);
            --ve-panel: rgba(255, 255, 255, 0.09);
            --ve-panel-soft: rgba(255, 255, 255, 0.07);
            --ve-accent: #ff3b44;
            --ve-accent-dark: #ff6b72;
            --ve-accent-soft: rgba(255, 59, 68, 0.14);
            --ve-good: #5ee7a8;
            --ve-warn-bg: rgba(255, 204, 102, 0.12);
            --ve-warn-border: rgba(255, 218, 137, 0.32);
            color: #f4f7fb;
        }

        .ve-app * {
            box-sizing: border-box;
        }

        .ve-app h2,
        .ve-app h3 {
            margin: 0;
            line-height: 1.25;
            color: #1d252f;
            letter-spacing: 0;
        }

        html.vet-dark .ve-app h2,
        html.vet-dark .ve-app h3 {
            color: #f7fbff;
        }

        .ve-app h2 {
            font-size: 30px;
            font-weight: 800;
        }

        .ve-app h3 {
            font-size: 20px;
            font-weight: 750;
        }

        .ve-app p {
            margin: 10px 0 0;
        }

        .ve-app form {
            margin: 16px 0 0;
        }

        .ve-shell {
            display: grid;
            gap: 16px;
        }

.ve-topbar,
.ve-panel {
    background: var(--ve-panel);
    border: 0;
            border-radius: 8px;
            box-shadow: 0 24px 70px rgba(16, 24, 40, 0.09);
            backdrop-filter: blur(18px);
            overflow: hidden;
            padding: 20px;
}

html.vet-dark .ve-topbar,
html.vet-dark .ve-panel {
    border: 1px solid var(--ve-border);
}

.ve-topbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 14px;
}

        .ve-user-title {
            font-weight: 700;
            font-size: 19px;
            color: #1d252f;
        }

        html.vet-dark .ve-user-title {
            color: #f7fbff;
        }

        .ve-user-subtitle,
        .ve-muted {
            color: var(--ve-muted);
            font-size: 13px;
            line-height: 1.45;
        }

        .ve-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .ve-app button,
        .ve-app .ve-button,
        .ve-app input[type="submit"] {
            appearance: none;
            border: 1px solid var(--ve-border-strong);
            border-radius: 6px;
            background: #ffffff;
            color: #1d252f;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-weight: 650;
            min-height: 38px;
            padding: 8px 14px;
            text-decoration: none;
            transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
            white-space: nowrap;
        }

        .ve-app button:hover,
        .ve-app .ve-button:hover,
        .ve-app input[type="submit"]:hover {
            background: #f8fafc;
            border-color: #aeb8c4;
            box-shadow: 0 10px 24px rgba(16, 24, 40, 0.1);
            transform: translateY(-1px);
        }

        .ve-app button:focus-visible,
        .ve-app .ve-button:focus-visible,
        .ve-app input:focus-visible,
        .ve-app select:focus-visible {
            outline: 3px solid rgba(215, 25, 32, 0.18);
            outline-offset: 2px;
        }

        .ve-app button:disabled {
            cursor: not-allowed;
            opacity: 0.6;
            transform: none;
        }

        .ve-app button[type="submit"],
        .ve-app .ve-button-primary {
            background: var(--ve-accent);
            color: #ffffff;
        }

        .ve-app button[type="submit"]:hover,
        .ve-app .ve-button-primary:hover {
            background: var(--ve-accent-dark);
            color: #ffffff;
        }

        .ve-app input,
        .ve-app select {
            border: 1px solid var(--ve-border-strong);
            border-radius: 6px;
            color: inherit;
            font: inherit;
            min-height: 40px;
            padding: 8px 11px;
            margin: 0 0 8px;
            max-width: 100%;
            background: #ffffff;
            transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
        }

        html.vet-dark .ve-app button,
        html.vet-dark .ve-app .ve-button,
        html.vet-dark .ve-app input[type="submit"] {
            background: rgba(255, 255, 255, 0.09);
            border: 1px solid var(--ve-border-strong);
            color: #f4f7fb;
        }

        html.vet-dark .ve-app button[type="submit"],
        html.vet-dark .ve-app .ve-button-primary {
            background: var(--ve-accent);
            border-color: var(--ve-accent);
            color: #ffffff;
        }

        html.vet-dark .ve-app input,
        html.vet-dark .ve-app select {
            background: rgba(17, 21, 27, 0.5);
            border: 1px solid var(--ve-border);
        }

        .ve-app input::placeholder {
            color: #8793a2;
        }

        .ve-app select option {
            background: #ffffff;
            color: #1d252f;
        }

        html.vet-dark .ve-app select option {
            background: #171b22;
            color: #f4f7fb;
        }

        .ve-app input:hover,
        .ve-app select:hover {
            border-color: #aeb8c4;
            box-shadow: 0 8px 20px rgba(16, 24, 40, 0.08);
        }

        .ve-app input:focus,
        .ve-app select:focus {
            border-color: var(--ve-accent);
            box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.14);
            outline: none;
        }

        html.vet-dark .ve-app input:hover,
        html.vet-dark .ve-app select:hover {
            border-color: var(--ve-border-strong);
        }

        html.vet-dark .ve-app input:focus,
        html.vet-dark .ve-app select:focus {
            border-color: var(--ve-accent);
        }

        .ve-panel form input:not([type="checkbox"]),
        .ve-panel form select {
            width: min(100%, 460px);
        }

        .ve-panel form button + button {
            margin-left: 8px;
        }

        .ve-consent {
            align-items: flex-start;
            display: flex;
            gap: 10px;
            margin: 8px 0 16px;
            max-width: 640px;
        }

        .ve-consent input[type="checkbox"] {
            flex: 0 0 auto;
            height: 18px;
            margin: 2px 0 0;
            min-height: auto;
            width: 18px;
        }

        .ve-consent span {
            color: var(--ve-muted);
            font-size: 13px;
            line-height: 1.4;
        }

        .ve-consent a {
            color: var(--ve-accent);
            font-weight: 650;
            text-decoration-thickness: 1px;
            text-underline-offset: 3px;
        }

        .ve-org-help {
            margin: 0 0 14px;
        }

        .ve-link-button {
            background: transparent !important;
            border: 0 !important;
            box-shadow: none !important;
            color: var(--ve-accent) !important;
            min-height: auto !important;
            padding: 0 !important;
            text-decoration: underline;
            text-underline-offset: 3px;
            white-space: normal !important;
        }

        .ve-link-button:hover {
            color: var(--ve-accent-dark) !important;
            transform: none !important;
        }

        .ve-modal[hidden] {
            display: none;
        }

        .ve-modal {
            align-items: center;
            display: flex;
            inset: 0;
            justify-content: center;
            padding: 18px;
            position: fixed;
            z-index: 9999;
        }

        .ve-modal-backdrop {
            background: rgba(17, 21, 27, 0.52);
            inset: 0;
            position: absolute;
        }

        .ve-modal-card {
            background: #ffffff;
            border: 1px solid var(--ve-border);
            border-radius: 8px;
            color: #1d252f;
            display: flex;
            flex-direction: column;
            box-shadow: 0 28px 90px rgba(16, 24, 40, 0.22);
            max-width: 440px;
            padding: 20px;
            width: min(100%, 440px);
            z-index: 1;
        }

        .ve-modal-card h3 {
            padding-right: 0;
        }

        .ve-modal-card h3 {
            color: #1d252f;
        }

        html.vet-dark .ve-modal-card {
            background: #202631;
            border-color: rgba(255, 255, 255, 0.24);
            color: #f4f7fb;
            box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
        }

        html.vet-dark .ve-modal-card h3 {
            color: #f7fbff;
        }

        .ve-modal-close {
            align-items: center;
            align-self: flex-end;
            display: inline-flex;
            font-size: 22px;
            height: 34px;
            justify-content: center;
            line-height: 1;
            margin: -6px -6px 8px auto;
            min-height: 32px !important;
            padding: 0 !important;
            width: 34px;
        }

        .ve-contact-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 14px;
        }

        .ve-range-row {
            align-items: center;
            display: grid;
            gap: 8px;
            grid-template-columns: max-content minmax(150px, 190px) max-content minmax(150px, 190px) max-content;
            margin: 0 0 12px;
            max-width: 760px;
        }

        .ve-range-row input[type="date"] {
            margin: 0;
            width: 100%;
        }

        .ve-status {
            background: var(--ve-warn-bg);
            border: 0;
            border-radius: 8px;
            box-shadow: 0 16px 34px rgba(147, 104, 16, 0.08);
            color: #4b3a12;
            padding: 14px 16px;
        }

        html.vet-dark .ve-status {
            border: 1px solid var(--ve-warn-border);
            box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
            color: #ffe8ad;
        }

        .ve-telegram-status {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .ve-profile-panel {
            display: none;
        }

        .ve-profile-panel.is-open {
            display: block;
            animation: ve-panel-in 0.18s ease-out;
        }

        .ve-grid {
            display: grid;
            gap: 16px;
        }

        @media (min-width: 760px) {
            .ve-auth-shell {
                grid-template-columns: minmax(270px, 0.92fr) minmax(0, 1.08fr);
            }

            .ve-auth-shell .ve-panel:first-child {
                background:
                    linear-gradient(135deg, rgba(215, 25, 32, 0.1), rgba(29, 37, 47, 0.05)),
                    rgba(255, 255, 255, 0.9);
                grid-column: 1 / -1;
            }

            html.vet-dark .ve-auth-shell .ve-panel:first-child {
                background:
                    linear-gradient(135deg, rgba(215, 25, 32, 0.18), rgba(255, 255, 255, 0.07)),
                    rgba(255, 255, 255, 0.09);
            }
        }

        .ve-empty {
            background: var(--ve-panel-soft);
            border: 0;
            border-radius: 8px;
            color: #5e6b7a;
            padding: 15px 16px;
        }

        .ve-empty strong {
            color: #1d252f;
        }

        html.vet-dark .ve-empty {
            border: 1px dashed var(--ve-border-strong);
            color: #b8cbe0;
        }

        html.vet-dark .ve-empty strong {
            color: #f7fbff;
        }

        .ve-remove-range {
            color: #b71920;
        }

        .ve-remove-range:hover {
            background: rgba(215, 25, 32, 0.08);
            border-color: rgba(215, 25, 32, 0.28);
            color: #901016;
        }

        html.vet-dark .ve-remove-range {
            color: #ffb4bd;
        }

        html.vet-dark .ve-remove-range:hover {
            background: rgba(255, 87, 111, 0.13);
            border-color: rgba(255, 159, 172, 0.42);
            color: #ffd3d9;
        }

        @keyframes ve-panel-in {
            from {
                opacity: 0;
                transform: translateY(-4px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .ve-privacy-policy {
            display: grid;
            gap: 10px;
        }

        .ve-privacy-policy h3 {
            margin-top: 10px;
        }

        @media (max-width: 640px) {
            .ve-app {
                font-size: 14px;
                margin: 0 auto;
                padding: 10px;
                width: 100%;
            }

            .ve-app h2 {
                font-size: 25px;
            }

            .ve-app h3 {
                font-size: 18px;
            }

            .ve-topbar,
            .ve-panel {
                padding: 16px;
                box-shadow: 0 10px 26px rgba(16, 24, 40, 0.06);
            }

            .ve-topbar {
                align-items: flex-start;
                flex-direction: column;
            }

            .ve-actions {
                justify-content: flex-start;
                width: 100%;
            }

            .ve-actions > *,
            .ve-panel form button,
            .ve-panel form input[type="submit"],
            .ve-panel form input:not([type="checkbox"]),
            .ve-panel form select {
                width: 100%;
            }

            .ve-panel form button + button {
                margin-left: 0;
                margin-top: 8px;
            }

            .ve-telegram-status {
                align-items: flex-start;
                flex-direction: column;
            }

            .ve-modal {
                align-items: flex-start;
                padding: 14px;
            }

            .ve-modal-card {
                margin-top: 34px;
                padding: 18px;
            }

            .ve-modal-card h3 {
                font-size: 18px;
                padding-right: 0;
            }

            .ve-range-row {
                align-items: stretch;
                grid-template-columns: 1fr;
                justify-items: stretch;
                margin-bottom: 16px;
            }

            .ve-range-row .ve-muted {
                margin: 0;
            }

            .ve-range-row input[type="date"] {
                width: 100%;
            }
        }

