/* Paleta de colores */
:root {
    --primary-color: #822886;
    --secondary-color: #f5f5f5;
    --accent-color: #ebebeb;
    --text-color: #333;
    --button-hover-color: #A348A5;
}

.wrap h1 {
    color: var(--primary-color);
}


/* Fondo blanco para la página */
body.storypresstor-page {
    background-color: #ffffff;
    padding: 20px;
}

.storyprestor-w-list-templates{

    background-color: #ffffff;
    padding: 20px;

}


.storypresstor-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Responsivo */
    gap: 20px;
    justify-content: start; /* Alinea los elementos al inicio (izquierda) */
}

.storypresstor-template-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: left;
    max-width:220px;
    transition: transform .5s;
}

.storypresstor-template-item:hover{
    transform: scale(1.05);
}


.storypresstor-tit-list-temp{
    margin:0px 0px;
}


.storypresstor-template-item h3{
    font-size:14px;
    font-weight: bold;
}

.storypresstor-template-item img {
    max-width: 100%;
    width:100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}


/* Paginación estilo Bootstrap */

.storypresstor-w-nav{

    display: flex;
    justify-content: right; /* Centrar horizontalmente */
    align-items: center;     /* Centrar verticalmente */

}

.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    border-radius: .25rem;
}

.page-item {
    margin: 0 2px;
}

.page-item.active .page-link {
    z-index: 1;
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.page-item .page-link {
    position: relative;
    display: block;
    padding: .5rem .75rem;
    margin-left: -1px;
    line-height: 1.25;
    color: #007bff;
    background-color: #fff;
    border: 1px solid #dee2e6;
    text-decoration: none;
    border-radius: .25rem;
    transition: all 0.15s ease-in-out;
}

.page-item .page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}


.storypresstor-template-actions {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    width:100%;
}

.storypresstor-template-actions .button {
    display: inline-block;
    padding: 2px 15px; /* Diseño más fino */
    text-align: center;
    border-radius: 5px;
    font-size: 11px; /* Fuente más pequeña */
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    background-color: var(--primary-color);
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: 1px solid transparent;
    height: 23px;
}

.storypresstor-template-actions .button-detail {
    background-color: var(--primary-color);
}

.storypresstor-template-actions .strpstr-add-selection {
    background-color: #4CAF50; /* Verde para instalar */
}



.storypresstor-template-actions .button:hover {
    background-color: var(--button-hover-color);
    border: 1px solid var(--primary-color);
}

.strpstr-price-list{
    font-size:14px;
    font-weight: bold;
    color:var(--primary-color);
}


/* Capa semitransparente */
#modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Capa semitransparente */
    z-index: 9998;
}

/* Estilos generales del popup */
#template-detail-popup{
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 700px;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    border-radius: 10px;
    overflow: hidden;
    padding: 20px;
    max-height: 90%;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Para centrar el contenido con márgenes */
.popup-content {
    display: flex;
    justify-content: space-between;
    height: 100%;
    margin: 20px 0; /* Aire en los márgenes superiores e inferiores */
}

/* Sección izquierda: Carrousel */
#template-carousel {
    width: 60%;
    margin-right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}


.carousel-inner {
    overflow: hidden;
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-inner img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px; /* Ajustar la altura máxima para respetar las proporciones */
    margin: 0 auto;
    object-fit: contain; /* Mantener proporciones */
}

.carousel-inner .carousel-item {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-inner .carousel-item.active {
    display: block;
    position: relative;
}

/* Botones de navegación */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1;
    font-size: 18px;
    border-radius: 50%;
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}


/* Sección derecha: Información de la plantilla */
.template-info {
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#template-title {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

#template-description {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 20px;
    flex-grow: 1;
}

#template-actions {
    display: flex;
    flex-direction: column;
}

#install-button, #install-button-pop, #delete-button-pop {
    padding: 6px 20px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 10px;
}

#install-button,#install-button-pop {
    background-color: #4CAF50;
}

#install-button-pop {
     width:100%;
 }

#install-button:disabled,#install-button-pop:disabled {
    background-color: #9E9E9E;
    cursor: not-allowed;
}

#delete-button-pop {
    background-color: #E74C3C;
}

#install-button:hover:not(:disabled),#install-button-pop:hover:not(:disabled), #delete-button-pop:hover {
    opacity: 0.9;
}


#w-quantity-selector-pop{
    width:49%;
    position:relative;
    display: inline-block;
}

#w-price-selector-pop{
    width:48%;
    margin-left:1%;
    position:relative;
    text-align: right;
    padding-right:5px;
    display: inline-block;
}

#strpstr-price-pop{
    font-size:40px;
    font-weight: bold;
    color: var(--primary-color);
    margin-top:-5px;
}


/* Botón de cerrar */
#close-popup {
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-color);
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .popup-content {
        flex-direction: column;
    }

    #template-carousel {
        width: 100%;
        margin-bottom: 20px;
    }

    .template-info {
        width: 100%;
    }
}

@media (max-width: 480px) {
    #template-title {
        font-size: 20px;
    }

    #template-description {
        font-size: 14px;
    }

    #install-button, #install-button-pop, #delete-button-pop {
        font-size: 12px;
        padding: 8px 16px;
    }

    #close-popup {
        font-size: 20px;
    }
}



/* BUSCADOR */

.storypresstor-search-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#storypresstor-search-form {
    display: flex;
    width: 100%;
    max-width: 700px; /* Aumentamos el ancho máximo para acomodar el selector */
    background-color: #f8f9fa;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#storypresstor-search-input {
    flex-grow: 2;
    border: none;
    background: none;
    outline: none;
    padding: 8px;
    font-size: 16px;
    border-radius: 4px;
}

.storypresstor-select {
    flex-grow: 1;
    border: none;
    background: none;
    outline: none;
    padding: 8px;
    margin-left: 10px;
    font-size: 16px;
    border-radius: 4px;
    background-color: #ffffff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.storypresstor-search-button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-left: 10px;
}

.storypresstor-search-button svg {
    width: 20px;
    height: 20px;
    fill: #007bff;
}


.strpstr-selected{
    background-color:#ccc!important;
}
