/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background-color: var(--color-bg-body);
    color: var(--color-dark);
}

h1 {
    font-size: 24px;
    margin-top: 20px;
    text-align: center;
}

h2 {
    font-size: 20px;
    margin-top: 20px;
    color: var(--color-dark-100);
    text-align: center;
}
main {
    padding-bottom: 25px;
    min-height: calc(100dvh - 245px);
}
.hidden {
    display: none!important;
}

.only-mobile{
    display: none;
}

.small-icon {
    width: 15px;
    color: var(--color-dark-200);
}

.overlay {

}

.overlay.visible {
    opacity: 0.7;
    background: rgba(0, 0, 0, 0.7);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
}

.content { 
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    overflow-y: scroll;
    box-sizing: border-box;
    margin-bottom: 25px;
}
.step-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 50px;
    width: 100%;
    max-width: 1280px;
    margin: 25px auto 0;
    flex-wrap: wrap;
}

.step-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 360px;
    margin: 0 auto 50px;
}
.step-footer-container {
    width: 360px;
}
.step-footer .button {
    width: auto;
}
.step-footer .button-back {
    background: transparent;
    color: var(--color-orange-400);
    transition: all 0.2s linear;
}

.step-footer .button-back:hover {
    background: transparent;
    color: var(--color-orange-100);
    text-decoration: underline;
}

/* Services cards */
.buyer-data, .card-design {
    width: 360px;
    border-radius: 8px;
    border: 1px solid var(--color-light-300);
    overflow: hidden;
    margin-bottom: 24px;
    background: var(--color-bg-card);
}
.buyer-data__form-giftcard-label {
    font-size: 16px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.step-1, .step-2, .summary {
    display: flex;
    flex-direction: column;
}

/* Buyer data */
.buyer-data__form, .card-design__form {
    padding-block: 20px 32px;
    padding-inline: 32px;
}

.char-counter {
    font-weight: 300;
    font-size: 12px;
    color: var(--color-dark-400);
}
.char-counter--yellow {
    color: var(--color-yellow);
}
.char-counter--red {
    color: var(--color-pink-400);
}
/* Contenedor principal */
.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 20px;
}

/* Botones */
.button {
    background: var(--color-bg-button);
    color: white;
    border: none;
    font-size: var(--font-size-button);
    font-weight: var(--font-weight-button);
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: var(--font-family);
    padding: 10px 15px;
}

.button:hover {
    background: var(--color-bg-button-hover);
}

.button:disabled {
    background: var(--color-dark-400)!important;
}

.danger .button,
.button.danger {
    background-color: #721c24;
    color: #f8d7da;
}

.button.fullwidth {
    width: 100%;
    height: 48px;
}
/* Paso de selección de fondo */
#background-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

#step-3 label,
#step-3 input[type="text"],
#step-3 textarea {
    width: 100%;
    margin: 10px 0;
}

#step-3 textarea {
    height: 80px;
}

.background-option {
    width: 120px;
    height: 150px;
    border-radius: 4px;
    cursor: pointer;
    object-fit: cover;
    transition: border 0.3s ease;
}

.background-option.selected {
    border: 3px solid var(--color-blue);
}

/* Formularios */
label {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: var(--color-dark);
}

input[type="text"], input[type="email"], input[type="number"], textarea {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    color: var(--color-dark);
}

textarea {
    resize: vertical;
    height: 70px;
}

/* Radios */
input[type="radio"] {
    margin-right: 5px;
}

.summary-cart {
    width: 100%;
    max-width: 360px;
}

.center {
    margin-inline: auto;
}

.center > * {
    text-align: center;
}

.width-sm {
    width: 100%;
    max-width: 360px;
}

.link-button {
    text-decoration: none;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 360px;
    margin: 0 auto 30px;
    height: 48px;
}


.icon {
    mask-size: 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    mask-position: center;
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}
.icon.green {
    background-color: #5bdb7d;
}
.icon.white {
    background-color: var(--color-light);
}
.icon.blue {
    background-color: var(--color-blue);
}
.icon.check-circle {
    --webkit-mask-image: url('/images/check-circle.svg');
    mask-image: url('/images/check-circle.svg');
}
.icon.calendar-plus {
    --webkit-mask-image: url('/images/calendar-plus.svg');
    mask-image: url('/images/calendar-plus.svg');
}
.icon.ticket {
    --webkit-mask-image: url('/images/ticket.svg');
    mask-image: url('/images/ticket.svg');
}
.icon.gift-box {
    --webkit-mask-image: url('/images/gift-box.svg');
    mask-image: url('/images/gift-box.svg');
}

.next-step-modal {
    transform: translateY(-100dvh);
    transition:
        transform 0.7s ease-out,
        overlay 0.7s ease-out allow-discrete,
        display 0.7s ease-out allow-discrete;
    
    background: var(--color-light);
    position: fixed;
    top: 15dvh;
    padding: 20px;
    margin: auto;
    border-radius: 12px;
    border: 1px solid var(--color-border-card);
    display: flex;
    flex-wrap: wrap;
    z-index: 9999;
}
.next-step-modal[open] {
    transform: translateY(0);
}

@starting-style {
    .next-step-modal[open] {
        transform: translateY(-100dvh);
    }
}

.next-step-modal::backdrop {
    background-color: rgb(0 0 0 / 0%);
    transition:
        display 0.7s allow-discrete,
        overlay 0.7s allow-discrete,
        background-color 0.7s;
    /* Equivalent to
    transition: all 0.7s allow-discrete; */
}

.next-step-modal[open]::backdrop {
    background-color: rgb(0 0 0 / 25%);
}

/* This starting-style rule cannot be nested inside the above selector
because the nesting selector cannot represent pseudo-elements. */

@starting-style {
    .next-step-modal[open]::backdrop {
        background-color: rgb(0 0 0 / 0%);
    }
}

.next-step-modal__title {
    margin-top: 0;
    font-weight: 400;
    margin-bottom: 20px;
}

input[type='checkbox'] {
    width:24px;
    height:24px;
    background:white;
    border-radius:2px;
    border:1px solid var(--color-dark-500);
}
input[type='checkbox']:checked {
    background: var(--color-blue);
}

input {
    font-family: var(--font-family);
}

/* alert */

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}
.alert {
    position: relative;
    padding: .75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: .25rem;
}
dialog.alert[open] {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 25px;
    align-items: center;
    margin: 0 auto;
    top: 25px;
}

.dialog[open] {
    display: inherit;
}
.dialog {
    display: none;
}