/* "Tarif Paylaş" page (Customizations\RecipeSubmission). Colours follow the theme's Customizer variables. */

.yt-rs {
    --yt-rs-primary: var(--gt-theme-primary, #e8572a);
    /* Neutral on purpose: the theme's --gt-theme-tertiary is an accent colour, not a border grey. */
    --yt-rs-border: color-mix(in srgb, var(--gt-text-color-primary, #1d1d1d) 14%, transparent);
    --yt-rs-text: var(--gt-text-color-primary, #1d1d1d);
    --yt-rs-muted: var(--gt-text-color-secondary, #6b6b6b);
    --yt-rs-soft: var(--gt-section-background, #f6f5f2);
    --yt-rs-card: var(--gt-body-background, #fff);
    --yt-rs-radius: 10px;
    --yt-rs-error: #c62828;
    --yt-rs-success: #2e7d32;
    margin: 0 auto 4rem;
    max-width: 1200px;
    color: var(--yt-rs-text);
}

/* The theme styles every label and button; undo what does not fit the form. */
.yt-rs label {
    text-transform: none;
    letter-spacing: normal;
}

.yt-rs .yt-rs-remove,
.yt-rs .yt-rs-tree-toggle,
.yt-rs .yt-rs-photo-delete,
.yt-rs .yt-rs-link-button {
    min-height: 0;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
}

.yt-rs input::placeholder,
.yt-rs textarea::placeholder {
    color: var(--yt-rs-muted);
    opacity: .55;
}

/* Only the first ingredient row shows the example values. */
.yt-rs .yt-rs-ingredient:not(:first-child) input::placeholder {
    color: transparent;
}

.yt-rs *,
.yt-rs *::before,
.yt-rs *::after {
    box-sizing: border-box;
}

/* Top bar */

.yt-rs-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 0 1rem;
}

.yt-rs-topbar-title {
    font-weight: 700;
    color: var(--yt-rs-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .8125rem;
}

.yt-rs-topbar-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.yt-rs-topbar-links > a:not(.yt-rs-button) {
    color: var(--yt-rs-text);
    font-weight: 600;
    text-decoration: none;
}

.yt-rs-topbar-links > a[aria-current] {
    color: var(--yt-rs-primary);
}

/* Headings, cards */

.yt-rs .yt-rs-heading {
    margin: 1.5rem 0 1.25rem;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    line-height: 1.2;
}

.yt-rs-intro {
    margin: -.5rem 0 1.25rem;
    color: var(--yt-rs-muted);
}

.yt-rs-card {
    background: var(--yt-rs-card);
    border: 1px solid var(--yt-rs-border);
    border-radius: var(--yt-rs-radius);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
}

.yt-rs .yt-rs-card-title {
    margin: 0 0 1rem;
    font-size: 1.125rem;
}

.yt-rs-empty,
.yt-rs-guest {
    text-align: center;
    padding: 3rem 1.5rem;
}

.yt-rs-guest .yt-rs-heading {
    margin-top: 0;
}

/* Layout: form + notes */

.yt-rs-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2.5rem;
    align-items: start;
}

.yt-rs-notes {
    position: sticky;
    top: 2rem;
    padding: .5rem 0;
    color: var(--yt-rs-muted);
}

/* Brand icon "Şef" (copy of the child theme's icons/sef.svg), drawn as a mask in the primary colour */
.yt-rs-notes-icon {
    display: block;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--yt-rs-primary);
    -webkit-mask: url("icons/sef.svg") left center / contain no-repeat;
    mask: url("icons/sef.svg") left center / contain no-repeat;
}

.yt-rs .yt-rs-notes h2 {
    margin: .75rem 0 1.25rem;
    padding-bottom: .75rem;
    font-size: 1.5rem;
    position: relative;
}

.yt-rs-notes h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 3px;
    background: var(--yt-rs-primary);
}

.yt-rs-notes p {
    margin: 0 0 1rem;
    line-height: 1.6;
}

/* Steps bar */

.yt-rs-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    border-radius: var(--yt-rs-radius);
    overflow: hidden;
    background: var(--yt-rs-soft);
    counter-reset: none;
}

.yt-rs-steps-item {
    position: relative;
    margin: 0;
}

.yt-rs-steps-item > a,
.yt-rs-steps-item > span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    height: 100%;
    padding: 1.1rem 1.75rem;
    color: var(--yt-rs-muted);
    font-weight: 700;
    font-size: .875rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    text-decoration: none;
}

.yt-rs-steps-item + .yt-rs-steps-item::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 50%;
    width: 28px;
    height: 28px;
    transform: translateY(-50%) rotate(45deg);
    /* Muted text colour: shows on the grey steps and on the red ones alike. */
    border-top: 2px solid color-mix(in srgb, var(--yt-rs-text) 35%, transparent);
    border-right: 2px solid color-mix(in srgb, var(--yt-rs-text) 35%, transparent);
    z-index: 1;
}

.yt-rs-steps-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid currentColor;
}

.yt-rs-steps-item.is-done,
.yt-rs-steps-item.is-current {
    background: var(--yt-rs-primary);
}

.yt-rs-steps-item.is-done > a,
.yt-rs-steps-item.is-done > span,
.yt-rs-steps-item.is-current > a,
.yt-rs-steps-item.is-current > span {
    color: #fff;
}

.yt-rs-steps-item.is-current .yt-rs-steps-number {
    background: #fff;
    color: var(--yt-rs-primary);
    border-color: #fff;
}

.yt-rs-steps-item.is-done .yt-rs-steps-number {
    font-size: 0;
}

.yt-rs-steps-item.is-done .yt-rs-steps-number::before {
    content: "✓";
    font-size: 1rem;
}

.yt-rs-steps-item > a:hover .yt-rs-steps-label {
    text-decoration: underline;
}

/* Fields */

.yt-rs-field + .yt-rs-field {
    margin-top: 1.5rem;
}

.yt-rs-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: .5rem;
}

.yt-rs-label-row .yt-rs-card-title {
    margin-bottom: 0;
}

.yt-rs label,
.yt-rs-field > label {
    font-weight: 600;
    font-size: .9375rem;
}

.yt-rs-field > label {
    display: block;
    margin-bottom: .5rem;
}

.yt-rs-hint {
    color: var(--yt-rs-primary);
    font-size: .8125rem;
    font-style: italic;
}

.yt-rs-optional {
    margin-left: .35em;
    color: var(--yt-rs-muted);
    font-weight: 400;
}

.yt-rs input[type="text"],
.yt-rs input[type="search"],
.yt-rs textarea,
.yt-rs select:not([multiple]) { /* :not() matches the theme's select:not([multiple]) rule, which loads later */
    width: 100%;
    min-height: 48px;
    padding: .7rem .9rem;
    border: 1px solid var(--yt-rs-border);
    border-radius: 6px;
    background: var(--yt-rs-card);
    color: var(--yt-rs-text);
    font: inherit;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color .15s, box-shadow .15s;
}

.yt-rs textarea {
    resize: vertical;
    min-height: 96px;
}

.yt-rs input:focus,
.yt-rs textarea:focus,
.yt-rs select:not([multiple]):focus {
    outline: none;
    border-color: var(--yt-rs-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--yt-rs-primary) 18%, transparent);
}

/* Buttons */

.yt-rs .yt-rs-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: .75rem 1.75rem;
    border: 1px solid var(--yt-rs-primary);
    border-radius: 999px; /* pills, like the site's other buttons */
    background: var(--yt-rs-primary);
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: .9375rem;
    text-decoration: none;
    cursor: pointer;
    transition: filter .15s, background-color .15s;
}

.yt-rs .yt-rs-button:hover {
    filter: brightness(.93);
    color: #fff;
}

.yt-rs .yt-rs-button--outline {
    background: transparent;
    color: var(--yt-rs-primary);
}

.yt-rs .yt-rs-button--outline:hover {
    color: var(--yt-rs-primary);
    background: color-mix(in srgb, var(--yt-rs-primary) 8%, transparent);
}

.yt-rs .yt-rs-button--small {
    min-height: 40px;
    padding: .5rem 1.1rem;
    font-size: .875rem;
}

.yt-rs .yt-rs-link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--yt-rs-primary);
    font: inherit;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.yt-rs-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: .5rem;
}

.yt-rs-form.is-busy .yt-rs-actions {
    opacity: .6;
    pointer-events: none;
}

/* Notices */

.yt-rs-notice {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    border-radius: var(--yt-rs-radius);
    border-left: 4px solid;
}

.yt-rs-notice ul {
    margin: 0;
    padding: 0 0 0 1.1rem;
}

.yt-rs-notice li + li {
    margin-top: .25rem;
}

.yt-rs-notice--error {
    border-color: var(--yt-rs-error);
    background: #fdecea;
    color: #8e1c1c;
}

.yt-rs-returned p {
    margin: 0;
}

.yt-rs-returned p + p {
    margin-top: .35rem;
}

.yt-rs-notice--success {
    border-color: var(--yt-rs-success);
    background: #edf7ee;
    color: #1e5622;
}

/* Ingredients */

.yt-rs-ingredient-head,
.yt-rs-ingredient {
    display: grid;
    grid-template-columns: 90px 170px minmax(0, 1fr) 40px;
    gap: .6rem;
    align-items: center;
}

.yt-rs-ingredient-head {
    margin-bottom: .4rem;
    color: var(--yt-rs-muted);
    font-size: .8125rem;
    font-weight: 600;
}

.yt-rs-ingredient-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.yt-rs-ingredient {
    margin: 0 0 .6rem;
}

.yt-rs-ingredient-name-wrap {
    position: relative;
}

.yt-rs-ingredient.is-suggested .yt-rs-ingredient-name {
    border-style: dashed;
    border-color: var(--yt-rs-primary);
    background: color-mix(in srgb, var(--yt-rs-primary) 5%, var(--yt-rs-card));
}

.yt-rs-ingredient.is-suggested .yt-rs-ingredient-name-wrap::after {
    content: "adımlardan eklendi";
    position: absolute;
    right: .6rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--yt-rs-primary);
    font-size: .6875rem;
    font-style: italic;
    pointer-events: none;
}

.yt-rs .yt-rs-remove {
    padding: 0;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--yt-rs-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.yt-rs .yt-rs-remove:hover,
.yt-rs .yt-rs-remove:focus-visible {
    background: var(--yt-rs-soft);
    color: var(--yt-rs-error);
}

.yt-rs-suggest {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    margin: 0;
    padding: .3rem 0;
    list-style: none;
    background: var(--yt-rs-card);
    border: 1px solid var(--yt-rs-border);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    max-height: 260px;
    overflow-y: auto;
}

.yt-rs-suggest li {
    margin: 0;
    padding: .55rem .9rem;
    cursor: pointer;
}

.yt-rs-suggest li:hover,
.yt-rs-suggest li.is-active {
    background: var(--yt-rs-soft);
    color: var(--yt-rs-primary);
}

/* Preparation steps */

.yt-rs-step-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.yt-rs-step {
    margin: 0;
}

.yt-rs-step + .yt-rs-step {
    margin-top: 1.25rem;
}

.yt-rs-step .yt-rs-label-row {
    margin-bottom: .4rem;
}

.yt-rs-step label {
    font-size: .875rem;
}

/* Photos */

.yt-rs-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 190px;
    padding: 1.5rem;
    border: 2px dashed var(--yt-rs-border);
    border-radius: var(--yt-rs-radius);
    color: var(--yt-rs-muted);
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}

.yt-rs-dropzone[hidden] {
    display: none;
}

.yt-rs-dropzone:hover,
.yt-rs-dropzone:focus-within,
.yt-rs-dropzone.is-dragover {
    border-color: var(--yt-rs-primary);
    background: color-mix(in srgb, var(--yt-rs-primary) 5%, transparent);
}

.yt-rs-dropzone .yt-rs-file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.yt-rs-dropzone-text {
    color: var(--yt-rs-text);
    font-weight: 600;
}

.yt-rs-upload-status {
    margin: .75rem 0 0;
    color: var(--yt-rs-muted);
    font-size: .875rem;
}

.yt-rs-upload-status:empty {
    display: none;
}

/* Optional video: link or uploaded file */
.yt-rs-video-preview {
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: var(--yt-rs-radius);
    background: var(--yt-rs-soft);
}

.yt-rs-video-preview iframe,
.yt-rs-video-preview video,
.yt-rs-video-preview .wp-video {
    display: block;
    width: 100% !important;
    max-width: 100%;
    margin: 0 auto;
}

.yt-rs-video-preview iframe:not(.yt-instagram-embed) {
    height: auto;
    aspect-ratio: 16 / 9;
}

.yt-rs-video-link > label {
    display: block;
    margin-bottom: .5rem;
}

.yt-rs-video-url-row {
    display: flex;
    gap: .5rem;
}

.yt-rs-video-url-row input {
    flex: 1;
    min-width: 0;
}

.yt-rs .yt-rs-video-add {
    flex: none;
    padding-inline: 1.25rem;
}

.yt-rs .yt-rs-video-add:disabled {
    opacity: .45;
    cursor: default;
}

.yt-rs-video-or {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1rem 0;
    color: var(--yt-rs-muted);
    font-size: .875rem;
}

.yt-rs-video-or::before,
.yt-rs-video-or::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--yt-rs-border);
}

.yt-rs .yt-rs-video-upload {
    display: flex;
    width: fit-content;
    margin: 0 auto;
    cursor: pointer;
}

.yt-rs-video.is-uploading .yt-rs-video-upload {
    opacity: .5;
    pointer-events: none;
}

.yt-rs-video-file {
    margin: 0;
}

.yt-rs-video-status {
    margin: .75rem 0 0;
    color: var(--yt-rs-muted);
    font-size: .875rem;
}

.yt-rs-video-status:empty {
    display: none;
}

.yt-rs-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
}

.yt-rs-photos:empty {
    display: none;
}

.yt-rs-photo {
    position: relative;
    margin: 0;
    padding: .5rem;
    border: 2px solid var(--yt-rs-border);
    border-radius: var(--yt-rs-radius);
    background: var(--yt-rs-card);
    transition: border-color .15s;
}

.yt-rs-photo.is-cover {
    border-color: var(--yt-rs-primary);
}

.yt-rs-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
}

.yt-rs-photo.is-loading {
    min-height: 220px;
    background: linear-gradient(90deg, var(--yt-rs-soft) 25%, var(--yt-rs-card) 50%, var(--yt-rs-soft) 75%) 0 0 / 200% 100%;
    animation: yt-rs-shimmer 1.2s linear infinite;
}

.yt-rs-photo.is-loading > * {
    opacity: .4;
}

@keyframes yt-rs-shimmer {
    to { background-position: -200% 0; }
}

.yt-rs .yt-rs-photo-delete {
    padding: 0;
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--yt-rs-error);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.yt-rs .yt-rs-photo-cover {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-top: .6rem;
    font-size: .875rem;
    cursor: pointer;
}

.yt-rs-photo-cover input {
    accent-color: var(--yt-rs-primary);
    width: 18px;
    height: 18px;
}

/* Categories */

.yt-rs-categories {
    position: relative;
}

/* Select-like trigger of the dropdown */
.yt-rs .yt-rs-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: .7rem 2.6rem .7rem .9rem;
    position: relative;
    border: 1px solid var(--yt-rs-border);
    border-radius: 6px;
    background: var(--yt-rs-card);
    color: var(--yt-rs-muted);
    font: inherit;
    font-size: 1rem;
    font-weight: 400;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    cursor: pointer;
}

.yt-rs .yt-rs-select[hidden] {
    display: none;
}

.yt-rs .yt-rs-select.has-value {
    color: var(--yt-rs-text);
}

.yt-rs .yt-rs-select:hover,
.yt-rs .yt-rs-select:focus-visible,
.yt-rs-categories.is-open .yt-rs-select {
    border-color: var(--yt-rs-primary);
    background: var(--yt-rs-card);
    color: var(--yt-rs-text);
    outline: none;
}

.yt-rs-select-value {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.yt-rs-select::after {
    content: "";
    position: absolute;
    right: 1rem;
    top: 50%;
    border: 6px solid transparent;
    border-top-color: var(--yt-rs-muted);
    border-bottom-width: 0;
    transform: translateY(-25%);
    transition: transform .15s;
}

.yt-rs-categories.is-open .yt-rs-select::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Dropdown panel: closed until the trigger opens it (only when the script runs) */
.yt-rs-categories.is-dropdown .yt-rs-select-panel {
    display: none;
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    padding: .9rem;
    background: var(--yt-rs-card);
    border: 1px solid var(--yt-rs-border);
    border-radius: 8px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .14);
}

.yt-rs-categories.is-dropdown.is-open .yt-rs-select-panel {
    display: block;
}

.yt-rs .yt-rs-select-done {
    width: 100%;
    min-height: 46px;
    margin-top: .9rem;
}

.yt-rs .yt-rs-select-done[hidden] {
    display: none;
}

.yt-rs-tree {
    margin-top: .75rem;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--yt-rs-border);
    border-radius: 6px;
    padding: .25rem .5rem;
}

.yt-rs-tree ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.yt-rs-tree ul ul {
    display: none;
    padding-left: 1.75rem;
}

.yt-rs-tree-item {
    margin: 0;
}

.yt-rs-tree-item.is-open > ul {
    display: block;
}

/* Same height and label width for every row: leaf rows keep an empty toggle slot. */
.yt-rs-tree-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    border-bottom: 1px solid var(--yt-rs-soft);
}

.yt-rs .yt-rs-tree-row label {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: .55rem .25rem;
    font-size: .9375rem;
    font-weight: 400;
    line-height: 1.4;
    cursor: pointer;
}

.yt-rs-tree-row input {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--yt-rs-primary);
}

.yt-rs .yt-rs-tree-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--yt-rs-muted);
    cursor: pointer;
}

.yt-rs button.yt-rs-tree-toggle:hover,
.yt-rs button.yt-rs-tree-toggle:focus-visible {
    background: var(--yt-rs-soft);
    color: var(--yt-rs-primary);
}

.yt-rs .yt-rs-tree-toggle--empty {
    cursor: default;
}

.yt-rs-tree-toggle--empty::before {
    display: none !important;
}

.yt-rs-tree-toggle::before {
    content: "";
    display: inline-block;
    border: 6px solid transparent;
    border-top-color: currentColor;
    border-bottom-width: 0;
    transition: transform .15s;
}

.yt-rs-tree-item.is-open > .yt-rs-tree-row .yt-rs-tree-toggle::before {
    transform: rotate(180deg);
}

/* Search: only matches and their parents, all open */
.yt-rs-tree.is-searching .yt-rs-tree-item {
    display: none;
}

.yt-rs-tree.is-searching .yt-rs-tree-item.is-match,
.yt-rs-tree.is-searching .yt-rs-tree-item.is-ancestor {
    display: block;
}

.yt-rs-tree.is-searching .yt-rs-tree-item.is-ancestor > ul {
    display: block;
}

.yt-rs-tree-empty {
    margin: .75rem 0 0;
    color: var(--yt-rs-muted);
}

/* Details */

.yt-rs-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1.25rem;
}

.yt-rs-details .yt-rs-field + .yt-rs-field {
    margin-top: 0;
}

.yt-rs .yt-rs-accept {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    margin: .25rem 0 1.5rem;
    font-weight: 500;
    cursor: pointer;
}

.yt-rs-accept input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--yt-rs-primary);
}

.yt-rs-accept a {
    color: var(--yt-rs-primary);
}

/* My recipes */

.yt-rs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .9rem;
}

.yt-rs-list-item {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: center;
    margin: 0;
    padding: 1rem;
    background: var(--yt-rs-card);
    border: 1px solid var(--yt-rs-border);
    border-radius: var(--yt-rs-radius);
}

.yt-rs-list-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--yt-rs-soft);
    font-size: 2rem;
}

.yt-rs-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-rs-list-thumb img.yt-rs-list-plate {
    width: 78%;
    height: auto;
    object-fit: contain;
}

.yt-rs .yt-rs-list-title {
    margin: .35rem 0 .25rem;
    font-size: 1.0625rem;
}

.yt-rs-list-meta {
    margin: 0;
    color: var(--yt-rs-muted);
    font-size: .8125rem;
}

.yt-rs-status {
    display: inline-block;
    padding: .15rem .6rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    background: var(--yt-rs-soft);
    color: var(--yt-rs-muted);
}

.yt-rs-status--pending {
    background: #fff4e0;
    color: #8a5300;
}

.yt-rs-status--returned,
.yt-rs-status--rejected {
    background: #fdecea;
    color: #8e1c1c;
}

.yt-rs-list-reason {
    margin: .35rem 0 0;
    color: #8e1c1c;
    font-size: .8125rem;
}

.yt-rs-status--publish {
    background: #edf7ee;
    color: var(--yt-rs-success);
}

.yt-rs-list-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.yt-rs-delete {
    margin: 0;
}

/* Responsive */

@media (max-width: 991px) {
    .yt-rs-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .yt-rs-notes {
        position: static;
        order: -1;
        padding: 1rem 1.25rem;
        border-radius: var(--yt-rs-radius);
        background: var(--yt-rs-soft);
        font-size: .9375rem;
    }

    .yt-rs-notes-icon {
        display: none;
    }

    .yt-rs .yt-rs-notes h2 {
        margin-top: 0;
        font-size: 1.125rem;
    }

    .yt-rs-notes p:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 767px) {
    .yt-rs-topbar {
        padding-top: 1rem;
    }

    .yt-rs-topbar-title {
        display: none;
    }

    .yt-rs-topbar-links {
        width: 100%;
        justify-content: space-between;
    }

    .yt-rs-steps-item > a,
    .yt-rs-steps-item > span {
        flex-direction: column;
        gap: .35rem;
        padding: .8rem .5rem;
        font-size: .6875rem;
        text-align: center;
    }

    .yt-rs-steps-item + .yt-rs-steps-item::before {
        display: none;
    }

    .yt-rs-card {
        padding: 1.1rem;
    }

    .yt-rs-ingredient-head {
        display: none;
    }

    /* One box per ingredient: quantity and unit above the name, both ending
       at the same edge, the remove button centred beside the two lines. */
    .yt-rs-ingredient {
        grid-template-columns: 70px minmax(0, 1fr) 32px;
        grid-template-areas:
            "quantity unit remove"
            "name name remove";
        gap: .4rem;
        padding: .5rem .35rem .5rem .5rem;
        border-radius: var(--yt-rs-radius);
        background: var(--yt-rs-soft);
    }

    .yt-rs-ingredient-quantity { grid-area: quantity; }
    .yt-rs-ingredient-unit { grid-area: unit; }
    .yt-rs-ingredient-name-wrap { grid-area: name; }
    .yt-rs .yt-rs-remove { grid-area: remove; width: 32px; height: 32px; }

    .yt-rs-actions {
        grid-template-columns: 1fr;
        gap: .75rem;
    }

    .yt-rs-photos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .6rem;
    }

    .yt-rs-list-item {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: .9rem;
    }

    .yt-rs-list-thumb {
        width: 64px;
        height: 64px;
    }

    .yt-rs-list-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

/* New recipe: how to enter it */

/* The form stays hidden behind the popup until a way is chosen. */
.yt-rs--choosing > :not(.yt-rs-method) {
    visibility: hidden;
}

.yt-rs-method {
    width: min(860px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: var(--yt-rs-card);
    color: var(--yt-rs-text);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}

.yt-rs-method.is-shaking {
    animation: yt-rs-method-shake .4s ease;
}

@keyframes yt-rs-method-shake {
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

@media (prefers-reduced-motion: reduce) {
    .yt-rs-method.is-shaking {
        animation: none;
    }
}

.yt-rs-method::backdrop {
    background: rgba(20, 20, 20, .72);
    backdrop-filter: blur(3px);
}

.yt-rs-method-inner {
    position: relative;
    padding: 2.5rem 2rem 2rem;
}

.yt-rs .yt-rs-method .yt-rs-heading {
    margin: 0 2rem 1.75rem;
    color: var(--yt-rs-text);
    font-size: clamp(1.375rem, 2.6vw, 1.75rem);
    text-align: center;
}

.yt-rs .yt-rs-method-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: .75rem;
    right: .75rem;
    width: 2.5rem;
    height: 2.5rem;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    color: var(--yt-rs-text);
    opacity: .6;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.yt-rs .yt-rs-method-close:hover,
.yt-rs .yt-rs-method-close:focus,
.yt-rs .yt-rs-method-close:active {
    background: transparent;
    color: var(--yt-rs-text);
    outline: 0;
    text-decoration: none;
}

.yt-rs .yt-rs-method-close:hover,
.yt-rs .yt-rs-method-close:focus-visible {
    background: var(--yt-rs-soft);
    opacity: 1;
}

.yt-rs-method .yt-rs-heading:focus {
    outline: 0;
}

.yt-rs-method-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.yt-rs-method-list > li {
    display: flex;
    margin: 0;
}

.yt-rs .yt-rs-method-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .875rem;
    width: 100%;
    min-height: 0;
    padding: 1.75rem 1.25rem 1.5rem;
    border: 2px solid var(--yt-rs-border);
    border-radius: 14px;
    background: var(--yt-rs-card);
    box-shadow: none;
    color: var(--yt-rs-text);
    font: inherit;
    text-align: center;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

/* The theme turns every hovered / focused button black; keep the card's own colours. */
.yt-rs .yt-rs-method-option:hover,
.yt-rs .yt-rs-method-option:focus,
.yt-rs .yt-rs-method-option:active {
    background: var(--yt-rs-card);
    color: var(--yt-rs-text);
    outline: 0;
}

.yt-rs .yt-rs-method-option:not(:disabled):hover,
.yt-rs .yt-rs-method-option:not(:disabled):focus-visible {
    border-color: var(--yt-rs-primary);
    background: color-mix(in srgb, var(--yt-rs-primary) 6%, var(--yt-rs-card));
    box-shadow: 0 10px 28px color-mix(in srgb, var(--yt-rs-primary) 25%, transparent);
    transform: translateY(-3px);
}

.yt-rs .yt-rs-method-option:not(:disabled):active {
    transform: translateY(0);
}

.yt-rs .yt-rs-method-option:not(:disabled):hover .yt-rs-method-icon,
.yt-rs .yt-rs-method-option:not(:disabled):focus-visible .yt-rs-method-icon {
    background: var(--yt-rs-primary);
    color: #fff;
    transform: scale(1.08);
}

.yt-rs .yt-rs-method-option:not(:disabled):hover .yt-rs-method-label,
.yt-rs .yt-rs-method-option:not(:disabled):focus-visible .yt-rs-method-label {
    color: var(--yt-rs-primary);
}

.yt-rs .yt-rs-method-option:disabled,
.yt-rs .yt-rs-method-option:disabled:hover,
.yt-rs .yt-rs-method-option:disabled:focus {
    border-color: var(--yt-rs-border);
    background: var(--yt-rs-soft);
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.yt-rs .yt-rs-method-option:disabled .yt-rs-method-icon,
.yt-rs .yt-rs-method-option:disabled .yt-rs-method-body {
    opacity: .6;
}

/* "YouTube Videosundan" / "Instagram Gönderisinden": panels inside the popup */

.yt-rs-method-panel {
    max-width: 560px;
    margin: 0 auto;
}

.yt-rs-method-panel .yt-rs-field + .yt-rs-field {
    margin-top: 1rem;
}

.yt-rs-method-panel .yt-rs-field .yt-rs-method-note {
    margin-top: .4rem;
    text-align: left;
}

.yt-rs-method-panel input[type="file"] {
    display: block;
    width: 100%;
    font-size: .875rem;
}

.yt-rs .yt-rs-method-panel .yt-rs-accept {
    margin: 1rem 0 0;
}

.yt-rs .yt-rs-method-back {
    position: absolute;
    top: 1rem;
    left: 1.25rem;
}

.yt-rs-method-intro,
.yt-rs-method-note {
    margin: 0 0 1rem;
    color: var(--yt-rs-muted);
    text-align: center;
}

.yt-rs-method-note {
    margin: .75rem 0 0;
    font-size: .8125rem;
}

.yt-rs-method-status {
    min-height: 1.5em;
    margin: .75rem 0 0;
    font-weight: 600;
    text-align: center;
}

.yt-rs-method-panel.is-busy .yt-rs-method-status::before {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: .5em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -.15em;
    animation: yt-rs-spin .8s linear infinite;
}

@keyframes yt-rs-spin {
    to { transform: rotate(360deg); }
}

.yt-rs-method-requests {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--yt-rs-border, #eee);
    font-size: .875rem;
}

.yt-rs-method-requests p {
    margin: 0 0 .5rem;
    font-weight: 600;
}

.yt-rs-method-requests ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.yt-rs-method-requests li + li {
    margin-top: .4rem;
}

.yt-rs-method-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* Instagram: the linked account's posts (InstagramAuth) and the manual way for personal accounts */

.yt-rs-ig-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.yt-rs .yt-rs-ig-item {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: var(--yt-rs-soft);
    color: #fff;
    text-align: left;
    cursor: pointer;
}

.yt-rs .yt-rs-ig-item:hover,
.yt-rs .yt-rs-ig-item:focus-visible,
.yt-rs .yt-rs-ig-item.is-selected {
    border-color: var(--yt-rs-primary);
}

.yt-rs-ig-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-rs-ig-type {
    position: absolute;
    top: .35rem;
    left: .35rem;
    padding: .1rem .4rem;
    border-radius: 4px;
    background: rgba(0, 0, 0, .6);
    font-size: .6875rem;
    font-weight: 600;
}

/* The shade under the caption; the caption itself is clamped to two lines. */
.yt-rs-ig-item::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 45%;
    background: linear-gradient(transparent, rgba(0, 0, 0, .75));
}

.yt-rs-ig-caption {
    position: absolute;
    right: .45rem;
    bottom: .4rem;
    left: .45rem;
    z-index: 1;
    display: -webkit-box;
    overflow: hidden;
    font-size: .6875rem;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.yt-rs-method-panel.is-busy .yt-rs-ig-item:not(.is-selected) {
    opacity: .45;
}

.yt-rs .yt-rs-ig-more {
    display: block;
    margin: .75rem auto 0;
}

.yt-rs-ig-manual {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--yt-rs-border);
}

.yt-rs-ig-manual summary {
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.yt-rs-ig-manual[open] summary {
    margin-bottom: 1rem;
}

@media (max-width: 480px) {
    .yt-rs-ig-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.yt-rs-method-icon {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--yt-rs-primary) 12%, transparent);
    color: var(--yt-rs-primary);
    transition: background-color .15s, color .15s, transform .15s;
}

.yt-rs-method-icon svg {
    width: 32px;
    height: 32px;
}

.yt-rs-method-option--youtube .yt-rs-method-icon {
    background: rgba(255, 0, 0, .1);
    color: #e00000;
}

.yt-rs-method-option--instagram .yt-rs-method-icon {
    background: rgba(214, 41, 118, .1);
    color: #d62976;
}

.yt-rs-method-body {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.yt-rs-method-label {
    color: var(--yt-rs-text);
    transition: color .15s;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.3;
}

.yt-rs-method-text {
    color: color-mix(in srgb, var(--yt-rs-text) 72%, transparent);
    font-size: .875rem;
    line-height: 1.5;
}

.yt-rs-method-soon {
    position: absolute;
    top: .75rem;
    right: .75rem;
    padding: .25rem .65rem;
    border-radius: 999px;
    background: var(--yt-rs-primary);
    color: #fff;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

@media (max-width: 720px) {
    .yt-rs-method-inner {
        padding: 2.25rem 1rem 1rem;
    }

    .yt-rs .yt-rs-method .yt-rs-heading {
        margin-bottom: 1.25rem;
    }

    .yt-rs-method-list {
        grid-template-columns: minmax(0, 1fr);
        gap: .75rem;
    }

    .yt-rs .yt-rs-method-option {
        flex-direction: row;
        gap: 1rem;
        padding: 1rem;
        text-align: left;
    }

    /* The badge sits above the label instead of in the corner, so the
       text keeps the card's full width. */
    .yt-rs .yt-rs-method-option:disabled {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "icon soon"
            "icon body";
        column-gap: 1rem;
        row-gap: .4rem;
        align-items: center;
    }

    .yt-rs .yt-rs-method-option:disabled .yt-rs-method-icon { grid-area: icon; }
    .yt-rs .yt-rs-method-option:disabled .yt-rs-method-body { grid-area: body; }

    .yt-rs-method-icon {
        width: 3rem;
        height: 3rem;
    }

    .yt-rs-method-icon svg {
        width: 26px;
        height: 26px;
    }

    .yt-rs-method-soon {
        position: static;
        grid-area: soon;
        justify-self: start;
        padding: .15rem .55rem;
        font-size: .625rem;
    }
}

/* Leaving with unsaved changes (RecipeSubmissionForm::leaveDialog()) */

.yt-rs-leave {
    width: min(460px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: var(--yt-rs-card);
    color: var(--yt-rs-text);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}

.yt-rs-leave::backdrop {
    background: rgba(20, 20, 20, .6);
}

.yt-rs-leave-inner {
    padding: 2rem;
    text-align: center;
}

.yt-rs .yt-rs-leave .yt-rs-heading {
    margin: 0 0 .75rem;
    font-size: 1.375rem;
}

.yt-rs-leave .yt-rs-heading:focus {
    outline: 0;
}

.yt-rs-leave p {
    margin: 0 0 1.5rem;
    color: var(--yt-rs-muted);
}

.yt-rs-leave-actions {
    display: grid;
    gap: .75rem;
}

.yt-rs .yt-rs-leave-actions .yt-rs-link-button {
    justify-self: center;
    margin-top: .25rem;
}

@media (max-width: 480px) {
    .yt-rs-leave-inner {
        padding: 1.5rem 1.25rem;
    }
}
