/* pages/Create.css */

.main-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    background-color: var(--color-secondary);
}

/* Logo */
.logo {
    width: 176px;
    height: auto;
}

.content-section {
    display: grid;
    grid-template-rows: auto 1fr auto;
    /* Define the rows: auto | 1fr | auto */
    flex-grow: 1;
    gap: 70px;

}

.upload-button {
    width: 200px;
    height: 200px;

    transition: background-color 0.3s;
}

.upload-button.bg-primary.upload-button--has-image {
    background-color: transparent !important;
}

.btn-next-step{
    display: none;
    color: var(--color-secondary-alt);
}
.btn-next-step,
.file-upload {
    width: 21.98%;
    min-width: 422px;
    background-color: var(--color-black);
}

.terms-section .terms-text {
    width: 42.08%;
    min-width: 808px;
}

/* wave animation  */

.wave-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    overflow: hidden;
    border-radius: 6px;
    display: none;
    /* Hidden by default */
}

.wave {
    position: relative;
    top: 0;
    width: 100%;
    height: 100%;
}

.wave:before,
.wave:after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 250%;
    height: 250%;
    background: black;
    /* We will include transform in the animation */
}

.wave:before {
    border-radius: 45%;
    background: var(--color-accent);
}

.wave:after {
    border-radius: 40%;
    background: var(--color-accent)d6;
}

/* New combined animation */
@keyframes shrinkAndRotate {
    0% {
        width: 250%;
        height: 250%;
        transform: translate(-50%, -75%) rotate(0deg);
        opacity: 1;
    }

    100% {
        width: 0%;
        height: 0%;
        transform: translate(-50%, -75%) rotate(360deg);
        opacity: 0;
    }
}

/* Apply the animation when the 'shrink' class is added */
.wave.shrink:before,
.wave.shrink:after {
    animation: shrinkAndRotate 7s forwards;
}

/* Trash Button */
button.upload-button:hover>.trash-icon {
    display: flex;
}

.trash-icon {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(14, 17, 24, 0.3);
    border-radius: 6px;
    backdrop-filter: blur(1px);
    z-index: 3;
}

/* inputs with icons */
.icon-container-pic,
.icon-container-coin {
    left: 16px;
}

.percentage-label {
    right: 16px;
}

/*  Description Textarea */
.description-textarea {
    min-height: 150px;
}

/* Total Section */
.total-section {
    padding: var(--spacing-xl) var(--spacing-6xl);
}

/* Upload Component */
.upload-container {
    padding: 26.9px;
    border: 1px dashed var(--color-primary);
    background: var(--color-deep-sapphire-blue);
    cursor: pointer;
}

.upload-icon-wrapper {
    width: 68px;
    height: 68px;
    padding: 14.167px;
}

.upload-sub-text {
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    line-height: 24px;
    letter-spacing: 0.12px;
    width: 358px;
}

.image-gallery {
    border: 1px dashed var(--color-primary);
    background: var(--color-deep-sapphire-blue);
    padding: 28px var(--spacing-lg-16);
}

.add-image,
.gallery-item {
    min-width: 144px;
    width: 144px;
    min-height: 144px;
    height: 144px;
    flex-shrink: 0;
}

.gallery-item {
    position: relative;
    transition: transform 0.3s ease-in-out;
    /* Smooth scaling effect */
}

.gallery-item:hover {
    /* transform: scale(1.05); Slight zoom on hover */
}

.remove-icon {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: #0000004D;
    display: flex !important;
    opacity: 0;
    /* Initially hidden */
    transition: opacity 0.3s ease-in-out;
    /* Smooth transition */
}

.gallery-item:hover>.remove-icon {
    opacity: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: cover;
}



/* form style */
/* Column Widths */
.column-left {
    width: 33.295%;
    min-width: 450px;
}

.column-right {
    width: 64.431%;
}


.px-80 {
    padding-left: 80px !important;
    padding-right: 80px !important;
}

/* Image Preview */
.image-preview {
    width: 100%;
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px transparent;
    transition: box-shadow 0.2s ease;
}

.image-preview.is-invalid {
    box-shadow: inset 0 0 0 1px var(--color-warning);
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
}

/* Switch Component Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    min-width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-secondary);
    border: 1px solid var(--color-secondary);
    transition: .4s;
    border-radius: 30px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    border-radius: 20px;
    left: 2.8px;
    bottom: 1.8px;
    background-color: var(--color-accent);
    transition: .4s;
}

input:checked+.slider {
    background-color: #007bff;
    border: 1px solid #007bff;
}

input:focus+.slider {
    /* box-shadow: 0 0 1px #007bff; */
}

input:checked+.slider:before {
    transform: translateX(1.4em);
    background-color: var(--color-secondary-alt);
}

/**/
/* checkbox inputs */
.container-checkbox {
    max-width: 100%;
    min-height: 100px;
    font-family: var(--font-family-base);
    font-size: 13px;
    padding: 16px;
    border-radius: 6px;
    border: 2px solid var(--color-primary);
    border: 2px solid var(--color-accent);
    background: var(--color-secondary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.container-checkbox.error {
    border-color: var(--color-warning);
    box-shadow: inset 0 0 0 1px var(--color-warning);
}

ul.ks-cboxtags {
    list-style: none;
}

ul.ks-cboxtags li {
    display: inline;
}

ul.ks-cboxtags li label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--color-accent);
    border-radius: 2px;
    color: var(--color-support-alt);
    white-space: nowrap;
    margin: 3px 2px;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: all .2s;
}

ul.ks-cboxtags li label {
    padding: 3px 10px;
    cursor: pointer;

    height: 25px;
    font-family: "Barlow Semi Condensed";
    /* font-size: var(--font-size-b-14); */
    font-size: 14px;
    font-weight: 600;
}

ul.ks-cboxtags li label::before {
    display: inline-flex;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 11px;
    content: "\f067";
    transition: transform .3s ease-in-out;
    align-items: center;
    width: 17px;
    height: 19px;
    justify-content: center;
}

ul.ks-cboxtags li input[type="checkbox"]:checked+label::before {
    content: "\f00c";
    transform: rotate(-360deg);
    transition: transform .3s ease-in-out;
}

ul.ks-cboxtags li input[type="checkbox"]:checked+label {
    /* border: 2px solid #1bdbf8; */
    background-color: var(--color-primary-alt);
    color: var(--color-white);
    transition: all .2s;
}

ul.ks-cboxtags li input[type="checkbox"] {
    display: absolute;
}

ul.ks-cboxtags li input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

ul.ks-cboxtags li input[type="checkbox"]:focus+label {
    /* border: 2px solid #e9a1ff; */
}

/* responsive */
/* featured-image */

@media (max-width: 860px) {

    .terms-section .terms-text {
        min-width: 540px;
    }

}

@media (max-width: 600px) {

    .nav-bar {
        padding-left: var(--spacing-5xl);
        padding-right: var(--spacing-5xl);
    }

    .content-section {
        padding: 0 var(--spacing-5xl);
    }

    .terms-section .terms-text {
        width: 100%;
        min-width: auto;
    }

}


@media (max-width: 506px) {

    .btn-next-step,
    .file-upload {
        width: 100%;
        min-width: auto;
    }

    .upload-button {
        width: 175px;
        height: 175px;
    }
    .wave-animation {
        width: 175px;
        height: 175px;
    }

}

@media (max-width: 462px) {

    .logo {
        width: 150px;
    }

    .close-button {
        width: auto !important;
        height: auto !important;
    }

    .slider:before{
        bottom: 2px;
    }
}

@media (max-width: 392px) {

    .header-section {
        gap: var(--spacing-xs) !important;
    }

}

/* responsive */
/* add Artwork Info */

@media (max-width: 1180px) {

    .column-left {
        width: 40%;
        min-width: auto;
    }

    .column-right {
        width: 60%;
        min-width: auto;
    }

    .framing-option-lbl.text-justify {
        text-align: start !important;
    }

}

@media (max-width: 980px) {

    .column-left {
        width: 45%;
    }

    .column-right {
        width: 55%;
    }

    .upload-sub-text {
        width: auto;
    }

}

@media (max-width: 860px) {

    .content--artwork.px-80 {
        padding-left: 60px !important;
        padding-right: 60px !important;
    }

    .content--artwork .gap-8,
    .content--artwork.gap-8 {
        gap: var(--spacing-xxl) !important;
    }

}

@media (max-width: 720px) {
    .content--artwork.mb-5{
        margin: 0 !important;
    }

    .nav-bar .actions-container{
        gap: 10px !important;
    }

    .nav-bar .actions-container strong{
        font-size: 17px;
    }

    .content--artwork.px-80 {
        padding-left: 0px !important;
        padding-right: 0px !important;
    }

    .content--artwork {
        flex-direction: column;
    }

    /* From 21px to 19px in width, the height auto */
    .card-header .toggle-btn .arrow-icon {
        width: 19px;
    }

    .actions-container button {
        display: none !important;
    }

    .column-left,
    .column-right {
        width: 100%;
        /* Flatten the DOM hierarchy */
        display: contents !important;
    }
    /* Assign order within columns */
    /* Column Left */
    .column-left > #section1 { order: 1; margin: 0 20px !important;} /* L'image principale */
    .column-left > #section2 { order: 2; margin: 0 20px !important;} /* La nature de l'œuvre */
    .column-left > #section5 { order: 5; margin: 0 20px !important;} /* Finitions */
    .column-left > #section6 { order: 6; margin: 0 20px !important;} /* Encadrement sur demande */
    .column-left > #section7 { order: 7; margin: 0 20px !important;} /* Statut et Collection */
    /* Column Right */
    .column-right > #section3 { order: 3; margin: 0 20px !important;} /* Les détails de l'œuvre */
    .column-right > #section4 { order: 4; margin: 0 20px !important;} /* Images supplémentaires */
    .column-right > #section8 { order: 8; margin: 0 20px !important;} /* Editions */
    .column-right > #section9 { order: 9; margin: 0 20px !important;} /* Tarifs */
    .column-right > #section10 { order: 10; } /* Total */

    .total-section{
        border-radius: 0 !important;
    }
}

@media (max-width: 570px) {

    .nav-bar .actions-container strong{
        display: none;
    }

}

.form-error {
    margin-top: 12px;
    color: #F64E60;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    white-space: pre-line;
}

.artwork-save-indicator {
    border: none;
    padding: 0;
    white-space: nowrap;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.artwork-save-indicator.is-saving {
    opacity: 0.85;
}

.artwork-save-indicator.is-error {
    color: #F64E60;
    text-decoration: underline;
}
