/* ========================================
   REGISTRACE STANICE - WIZARD V2
   MOBILE-FIRST + BEM
   ======================================== */

:root {
    /* Oranžová paleta */
    --orange-50: #fff5f0;
    --orange-100: #ffe8dd;
    --orange-200: #ffd0bb;
    --orange-300: #ffb088;
    --orange-400: #ff8855;
    --orange-500: #ff6b35;
    --orange-600: #ff3d00;

    /* Neutrální barvy */
    --gray-50: #fafafa;
    --gray-100: #f4f4f5;
    --gray-200: #e4e4e7;
    --gray-300: #d4d4d8;
    --gray-400: #a1a1aa;
    --gray-500: #71717a;
    --gray-600: #52525b;
    --gray-700: #3f3f46;
    --gray-800: #27272a;
    --gray-900: #18181b;

    /* Funkční barvy */
    --success: #22c55e;
    --success-light: #f0fdf4;
    --error: #ef4444;
    --error-light: #fef2f2;

    /* Stíny */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-orange: 0 4px 14px rgba(255, 107, 53, 0.35);

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

/* ========================================
   ZÁKLADNÍ RESET
   ======================================== */

* {
    box-sizing: border-box;
}

/* ========================================
   PROGRESS BAR - MOBILE FIRST
   ======================================== */

.wizard-progress {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.wizard-progress__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.wizard-progress__back {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.wizard-progress__back:hover {
    opacity: 1;
}

.wizard-progress__back svg {
    width: 18px;
    height: 18px;
}

.wizard-progress__logo {
    display: block;
}

.wizard-progress__logo-img {
    height: 28px;
    width: auto;
    filter: brightness(0) invert(1);
}

.wizard-progress__spacer {
    width: 50px;
}

.wizard-progress__track {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    margin-bottom: 16px;
    overflow: hidden;
}

.wizard-progress__fill {
    height: 100%;
    background-color: #ffffff;
    border-radius: var(--radius-full);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-progress__steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.wizard-progress__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.wizard-progress__number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.wizard-progress__step--active .wizard-progress__number,
.wizard-progress__step--completed .wizard-progress__number {
    background-color: #ffffff;
    color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wizard-progress__step--completed .wizard-progress__number::after {
    content: '✓';
}

.wizard-progress__label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    white-space: nowrap;
}

.wizard-progress__step--active .wizard-progress__label {
    color: #ffffff;
    font-weight: 500;
}

/* ========================================
   WIZARD CONTAINER
   ======================================== */

.wizard {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0 100px;
    background-color: var(--gray-50);
    min-height: calc(100vh - 150px);
}

.wizard__step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.wizard__step--active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   WIZARD HEADER
   ======================================== */

.wizard__header {
    text-align: center;
    padding: 24px 20px 16px;
    background-color: var(--gray-50);
}

.wizard__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--orange-100) 0%, var(--orange-50) 100%);
    border-radius: var(--radius-lg);
}

.wizard__icon svg {
    width: 28px;
    height: 28px;
    color: var(--orange-500);
}

.wizard__title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
}

.wizard__subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.5;
}

/* ========================================
   WIZARD CONTENT
   ======================================== */

.wizard__content {
    padding: 20px 16px;
}

/* ========================================
   FORM FIELDS
   ======================================== */

.wizard__field {
    margin-bottom: 20px;
}

.wizard__label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.wizard__required {
    color: var(--error);
}

.wizard__input,
.wizard__select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--gray-800);
    background-color: #ffffff;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.wizard__input:focus,
.wizard__select:focus {
    outline: none;
    border-color: var(--orange-500);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.wizard__input::placeholder {
    color: var(--gray-400);
}

.wizard__input--error,
.wizard__select--error {
    border-color: var(--error);
    background-color: var(--error-light);
}

.wizard__input--error:focus,
.wizard__select--error:focus {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.wizard__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
}

.wizard__hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.4;
}

/* ========================================
   AUTOCOMPLETE
   ======================================== */

.wizard__autocomplete {
    position: relative;
}

.wizard__autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid var(--gray-200);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    max-height: 200px;
    overflow-y: auto;
    z-index: 50;
    display: none;
}

.wizard__autocomplete-list--active {
    display: block;
}

.wizard__autocomplete-item {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.wizard__autocomplete-item:hover {
    background-color: var(--orange-50);
}

/* ========================================
   FILE UPLOAD
   ======================================== */

.wizard__upload {
    position: relative;
}

.wizard__upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.wizard__upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background-color: #ffffff;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.wizard__upload-label:hover {
    border-color: var(--orange-400);
    background-color: var(--orange-50);
}

.wizard__upload-icon {
    width: 40px;
    height: 40px;
    color: var(--gray-400);
    margin-bottom: 8px;
}

.wizard__upload-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.wizard__upload-hint {
    font-size: 12px;
    color: var(--gray-500);
}

.wizard__upload--has-file .wizard__upload-label {
    border-color: var(--success);
    background-color: var(--success-light);
}

/* Tlačítko přeskočit */
.wizard__skip-link {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    background: none;
    border: none;
    font-size: 13px;
    color: var(--gray-500);
    text-align: center;
    cursor: pointer;
    transition: color 0.2s ease;
}

.wizard__skip-link:hover {
    color: var(--gray-700);
    text-decoration: underline;
}

/* Přeskočeno - notifikace */
.wizard__skipped-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--gray-600);
}

.wizard__skipped-undo {
    margin-left: auto;
    padding: 6px 12px;
    background: none;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.wizard__skipped-undo:hover {
    background-color: #ffffff;
    border-color: var(--gray-400);
    color: var(--gray-800);
}

/* ========================================
   SEARCH INPUT
   ======================================== */

.wizard__search-wrapper {
    position: relative;
}

.wizard__search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--gray-400);
    pointer-events: none;
    z-index: 1;
}

.wizard__input--search {
    padding-left: 46px !important;
    padding-right: 44px;
}

.wizard__search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: background-color 0.2s ease, color 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.wizard__search-clear--visible {
    opacity: 1;
    pointer-events: auto;
}

.wizard__search-clear:hover {
    background-color: var(--gray-100);
    color: var(--gray-600);
}

.wizard__search-clear svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   SELECTED BREEDS - MODERN (jako původní verze)
   ======================================== */

.wizard__selected-breeds {
    background-color: var(--orange-50);
    border: 1px solid var(--orange-200);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 20px;
    min-height: 56px;
}

.wizard__selected-empty {
    font-size: 13px;
    color: var(--gray-400);
    text-align: center;
    margin: 0;
}

.wizard__selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wizard__selected-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--orange-400) 0%, var(--orange-500) 100%);
    color: #ffffff;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
}

.wizard__selected-tag-remove {
    width: 14px;
    height: 14px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.15s ease;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard__selected-tag-remove:hover {
    opacity: 1;
}

.wizard__selected-tag-remove svg {
    width: 14px;
    height: 14px;
    stroke: #ffffff;
}

/* ========================================
   BREEDS LIST - MODERN (grid layout jako původní verze)
   ======================================== */

.wizard__breeds-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.wizard__loading {
    padding: 24px;
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
}

.wizard__breeds-group-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wizard__breeds-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.wizard__breed-option {
    cursor: pointer;
}

.wizard__breed-option input {
    display: none;
}

.wizard__breed-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    background-color: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    text-align: center;
}

.wizard__breed-option input:checked + .wizard__breed-card {
    border-color: var(--orange-400);
    background-color: var(--orange-50);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.wizard__breed-card:hover {
    border-color: var(--orange-300);
}

.wizard__breed-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}

/* ========================================
   ADVANTAGES (jako původní verze)
   ======================================== */

.wizard__advantages-counter {
    text-align: center;
    padding: 16px;
    background-color: var(--orange-50);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.wizard__advantages-count {
    font-size: 28px;
    font-weight: 700;
    color: var(--orange-500);
}

.wizard__advantages-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-left: 4px;
}

.wizard__advantages-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.wizard__advantages-category {
    /* bez rámečku, jen nadpis a grid */
}

.wizard__advantages-category-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0 0 14px 0;
}

.wizard__advantages-category-title svg {
    width: 18px;
    height: 18px;
    color: var(--orange-500);
}

.wizard__advantages-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wizard__advantage-option {
    cursor: pointer;
}

.wizard__advantage-option input {
    display: none;
}

.wizard__advantage-card {
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    background-color: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
}

.wizard__advantage-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--orange-400) 0%, var(--orange-500) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.wizard__advantage-icon svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.wizard__advantage-option input:checked + .wizard__advantage-card .wizard__advantage-icon {
    background: linear-gradient(135deg, var(--orange-500) 0%, var(--orange-600) 100%);
}

.wizard__advantage-option input:checked + .wizard__advantage-card {
    border-color: var(--orange-400);
    background-color: var(--orange-50);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.wizard__advantage-card:hover {
    border-color: var(--orange-300);
}

.wizard__advantage-option input:disabled + .wizard__advantage-card {
    opacity: 0.5;
    cursor: not-allowed;
}

.wizard__advantage-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 3px;
}

.wizard__advantage-desc {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.4;
}

/* ========================================
   NAVIGATION
   ======================================== */

.wizard__navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 12px;
    padding: 16px;
    background-color: #ffffff;
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 90;
}

.wizard__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wizard__btn svg {
    width: 18px;
    height: 18px;
}

.wizard__btn--back {
    flex: 0 0 auto;
    background-color: var(--gray-100);
    color: var(--gray-700);
}

.wizard__btn--back:hover {
    background-color: var(--gray-200);
}

.wizard__btn--next,
.wizard__btn--submit {
    flex: 1;
    background: linear-gradient(135deg, var(--orange-500) 0%, var(--orange-600) 100%);
    color: #ffffff;
    box-shadow: var(--shadow-orange);
}

.wizard__btn--next:hover,
.wizard__btn--submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.45);
}

.wizard__btn--next:active,
.wizard__btn--submit:active {
    transform: translateY(0);
}

.wizard__btn--submit {
    font-size: 16px;
    padding: 16px 24px;
}

/* ========================================
   TABLET (min-width: 600px)
   ======================================== */

@media (min-width: 600px) {
    .wizard-progress {
        padding: 20px 24px;
    }

    .wizard-progress__logo-img {
        height: 32px;
    }

    .wizard-progress__number {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .wizard-progress__label {
        font-size: 12px;
    }

    .wizard {
        max-width: 600px;
        margin: 0 auto;
        padding-bottom: 120px;
    }

    .wizard__header {
        padding: 32px 24px 20px;
    }

    .wizard__icon {
        width: 64px;
        height: 64px;
    }

    .wizard__icon svg {
        width: 32px;
        height: 32px;
    }

    .wizard__title {
        font-size: 24px;
    }

    .wizard__subtitle {
        font-size: 15px;
    }

    .wizard__content {
        padding: 24px;
    }

    .wizard__advantages-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .wizard__navigation {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        padding: 16px 24px;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
}

/* ========================================
   DESKTOP (min-width: 900px)
   ======================================== */

@media (min-width: 900px) {
    .wizard-progress {
        padding: 24px 32px;
    }

    .wizard-progress__steps {
        max-width: 400px;
        margin: 0 auto;
    }

    .wizard-progress__number {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .wizard-progress__label {
        font-size: 13px;
    }

    .wizard {
        max-width: 680px;
    }

    .wizard__header {
        padding: 40px 32px 24px;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }

    .wizard__icon {
        width: 72px;
        height: 72px;
        margin-bottom: 16px;
    }

    .wizard__icon svg {
        width: 36px;
        height: 36px;
    }

    .wizard__title {
        font-size: 28px;
    }

    .wizard__content {
        padding: 32px;
    }

    .wizard__field {
        margin-bottom: 24px;
    }

    .wizard__input,
    .wizard__select {
        padding: 16px 18px;
    }

    .wizard__input--search {
        padding-left: 46px !important;
    }

    .wizard__advantages-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .wizard__advantage-card {
        padding: 16px 18px;
    }

    .wizard__navigation {
        max-width: 680px;
        padding: 20px 32px;
    }

    .wizard__btn {
        padding: 16px 24px;
        font-size: 16px;
    }

    .wizard__btn--submit {
        font-size: 17px;
        padding: 18px 32px;
    }
}

/* ========================================
   PREVIEW (náhled nahraného souboru)
   ======================================== */

.wizard__preview {
    margin-top: 12px;
}

.wizard__preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: var(--success-light);
    border: 1px solid var(--success);
    border-radius: var(--radius-md);
}

.wizard__preview-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--success);
    border-radius: var(--radius-sm);
}

.wizard__preview-icon svg {
    width: 18px;
    height: 18px;
    color: #ffffff;
}

.wizard__preview-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wizard__preview-remove {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.wizard__preview-remove:hover {
    background-color: var(--error-light);
    color: var(--error);
}

.wizard__preview-remove svg {
    width: 16px;
    height: 16px;
}
