:root {
    --cream: #FBF7F3;
    --dark-teal: #125D65;
    --chic-pink: #F29BBA;
    --warm-beige: #DAB99E;
    --vibrant-orange: #EB7620;
    --golden-yellow: #F3A908;
    --dark-gray: #1F2937;
}

body {
    background-color: #FFFFFF;
}

#crochet-personalizer-app {
    font-family: 'Poppins', sans-serif !important;
    font-size: 17px;
    display: flex;
    justify-content: center;
    width: 100%;
}

#crochet-personalizer-app h3,
#crochet-personalizer-app h4,
#crochet-personalizer-app label,
#crochet-personalizer-app button,
#crochet-personalizer-app input,
#crochet-personalizer-app p {
    font-family: 'Poppins', sans-serif !important;
}

#crochet-personalizer-app .step-title {
    font-size: 33px !important;
    font-weight: 700 !important;
}

#crochet-personalizer-app .section-title {
    font-size: 23px !important;
    font-weight: 700 !important;
}

#crochet-personalizer-app button,
#crochet-personalizer-app input[type="button"],
#crochet-personalizer-app input[type="submit"] {
    cursor: pointer;
}

#crochet-personalizer-app .app-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    border: 1px solid var(--dark-gray);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.15s ease-out;
}

#crochet-personalizer-app .app-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.12);
}

#crochet-personalizer-app .app-button:active {
    transform: translateY(0px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#crochet-personalizer-app .btn-primary {
    background-color: black;
    color: white;
    border-radius: 9999px;
    border-color: black;
}

#crochet-personalizer-app .btn-primary:hover {
    color: white !important;
    background-color: #333;
}

#crochet-personalizer-app .color-swatch {
    transition: box-shadow 0.2s ease-in-out;
    box-shadow: 0 2px 7px 0 rgb(0 0 0 / 27%), 0 0 0 3px transparent;
    /* Sombra de borde inicial transparente */
    border: none;
}

#crochet-personalizer-app .color-swatch:hover {
    box-shadow: 0 2px 7px 0 rgb(0 0 0 / 27%), 0 0 0 3px var(--dark-gray);
    /* Se activa la sombra del borde */
}

#crochet-personalizer-app .selected-color {
    box-shadow: 0 2px 7px 0 rgb(0 0 0 / 27%), 0 0 0 3px var(--dark-gray);
    /* Se activa la sombra del borde */
}

#crochet-personalizer-app .preview-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#crochet-personalizer-app .colorFondo-path,
#crochet-personalizer-app .color1-path,
#crochet-personalizer-app .color2-path,
#crochet-personalizer-app .color3-path {
    transition: fill 0.35s ease-in-out;
}

#crochet-personalizer-app .modal-overlay {
    z-index: 100;
}

#crochet-personalizer-app .modal-overlay {
    transition: opacity 0.3s ease-in-out;
}

#crochet-personalizer-app .modal-container {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#crochet-personalizer-app #preview-wrapper {
    transition: background-color 0.35s ease-in-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#crochet-personalizer-app #saved-designs-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    #crochet-personalizer-app #saved-designs-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

#crochet-personalizer-app .saved-design-card {
    position: relative;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

#crochet-personalizer-app .saved-design-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.08);
}

#crochet-personalizer-app .saved-design-preview {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f0f0f0;
    flex-shrink: 0;
}

#crochet-personalizer-app .saved-design-title {
    font-size: 1rem;
    padding: 0.75rem 0.5rem;
    font-weight: 500;
    color: var(--dark-gray);
    text-align: center;
    background-color: #fff;
}

#crochet-personalizer-app .delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6) !important;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

#crochet-personalizer-app .saved-design-card:hover .delete-btn {
    opacity: 1;
    transform: scale(1);
}

#crochet-personalizer-app .delete-btn:hover {
    background-color: var(--dark-gray) !important;
    transform: scale(1.1) !important;
}

#crochet-personalizer-app .layer-tab-button {
    background-color: transparent;
    border: none;
    border-bottom: 3px solid #E5E7EB;
    padding: 0.75rem 0.5rem;
    border-radius: 0;
    font-weight: 500;
    color: #6B7280;
    text-align: center;
    transition: color 0.2s, border-color 0.2s;
    flex-grow: 1;
}

#crochet-personalizer-app .layer-tab-button:hover {
    color: var(--dark-gray);
}

#crochet-personalizer-app .layer-tab-button.active-layer-tab {
    color: var(--dark-gray);
    font-weight: 700;
    border-bottom-color: var(--dark-gray);
}

.design-assignment-thumbnail {
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.design-assignment-thumbnail.selected-design {
    border-color: var(--dark-gray);
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(31, 41, 55, 0.5);
}

#crochet-personalizer-app .pattern-selector-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f3f4f6;
    color: var(--dark-gray);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: all 0.2s ease-in-out;
    padding: 20px !important;
}

#crochet-personalizer-app .pattern-selector-btn:hover {
    background-color: #e5e7eb;
    border-color: var(--dark-gray);
}

#crochet-personalizer-app .pattern-selector-btn.active-pattern {
    background-color: var(--dark-gray);
    color: white;
    border-color: var(--dark-gray);
}

#crochet-personalizer-app .layer-tab-color-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    display: inline-block;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

#crochet-personalizer-app .link-button {
    background: none;
    border: none;
    box-shadow: none;
    color: var(--dark-gray);
    font-weight: 500;
    text-decoration: none;
    transition: text-decoration 0.2s;
    padding: 0.5rem;
}

#crochet-personalizer-app .link-button:hover {
    text-decoration: underline;
}

.assignment-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.edit-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.assignment-card-image:hover .edit-overlay {
    opacity: 1;
}

.assignment-card-image {
    cursor: pointer;
}

#crochet-personalizer-app .add-assignment-btn {
    background-color: transparent !important;
    border-style: dashed !important;
    border-width: 2px !important;
    border-color: #D1D5DB !important;
    border-radius: 0.75rem !important;
    color: #9CA3AF !important;
    padding: 0 !important;
    width: 100%;
    aspect-ratio: 1 / 1;
    font-size: 3rem !important;
    font-weight: 300 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
}

#crochet-personalizer-app .add-assignment-btn:hover {
    background-color: #F9FAFB !important;
    border-color: #9CA3AF !important;
}

.delete-assignment-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50% !important;
    background-color: white !important;
    color: black !important;
    border: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    font-weight: bold;
    line-height: 1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s;
    z-index: 10;
    padding: 0 !important;
}

.delete-assignment-btn:hover {
    background-color: #f3f4f6 !important;
    transform: scale(1.1);
}

#crochet-personalizer-app .design-placeholder {
    aspect-ratio: 1 / 1 !important;
}

#crochet-personalizer-app .product-card-visual img {
    border-width: 3px !important;
    border-style: solid !important;
    border-color: #E5E7EB !important;
    /* gray-200 */
    transition: border-color 0.2s ease-in-out !important;
    border-radius: 33px !important;
}

#crochet-personalizer-app .product-card-visual.selected img {
    border-color: var(--dark-gray) !important;
}

#crochet-personalizer-app .product-card-visual.selected .product-title {
    color: var(--dark-gray) !important;
}
