@view-transition {
  navigation: auto;
}

:root {
  /* значения по умолчанию: справа→налево */
  --vt-in: 100%;
  --vt-out: -25%;
}

/* Слайд */
::view-transition-old(root) { animation: slide-out .35s both ease; }
::view-transition-new(root) { animation: slide-in  .35s both ease; }

@keyframes slide-in  { from { transform: translateX(var(--vt-in)); }  to { transform: translateX(0); } }
@keyframes slide-out { from { transform: translateX(0); }            to { transform: translateX(var(--vt-out)); } }
/* Index page styles */
.index-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.index-container {
    text-align: center;
}

.index-container h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
}

/* List page styles */
.parts-list a {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--primary);
    border-radius: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}

.parts-list a:hover {
    background-color: var(--primary-hover);
}

.parts-list img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.25rem;
    margin-right: 1rem;
    background-color: #ddd;
}

.parts-list div {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Toolbar styles */
.toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: var(--primary-background, #fff);
    border-bottom: 1px solid var(--muted-border-color, #ddd);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toolbar a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
    font-size: 24px;
    color: var(--primary, #000);
}

body {
    padding-top: 50px;
}

/* Edit page styles */
.part-image-large {
    width: 100%;
    max-width: 400px;
    height: 300px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    background-color: #ddd;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.buttons a,
.buttons button {
    flex: 1;
    height: 3rem;
    padding: 0.75rem 1.25rem !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
}

fieldset {
    margin-bottom: 1rem;
}

legend {
    font-weight: 600;
}

/* Success page styles */
.success-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.success-container {
    text-align: center;
}

.success-container h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
    color: var(--primary);
}
