/**
 * Estilos para el Modal de subida de fotos
 * Versión 4.2.2 - Ajustes visuales en controles de cantidad
 */

.revelado-modal-oculto {
    display: none;
}

#revelado-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 25, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#revelado-cropper-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 25, 0.85);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#revelado-modal-overlay:not(.revelado-modal-oculto),
#revelado-cropper-modal-overlay:not(.revelado-modal-oculto) {
    opacity: 1;
    visibility: visible;
}

#revelado-modal-contenido, #revelado-cropper-modal-contenido {
    background-color: #fdfdfd;
    padding: 25px 35px;
    border-radius: 12px;
    width: 95%;
    max-width: 1100px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

#revelado-modal-overlay:not(.revelado-modal-oculto) #revelado-modal-contenido,
#revelado-cropper-modal-overlay:not(.revelado-modal-oculto) #revelado-cropper-modal-contenido {
    transform: scale(1);
}

.revelado-modal-cerrar-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: 300;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    transition: color 0.2s ease;
}
.revelado-modal-cerrar-btn:hover {
    color: #333;
}

#revelado-previews-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 20px;
    padding: 20px;
    min-height: 200px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    background-color: #f4f5f7;
}

@media (min-width: 768px) {
    #revelado-previews-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.revelado-preview-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: opacity 0.3s ease;
    position: relative;
}

.revelado-delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 6;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}
.revelado-delete-btn:hover {
    background-color: #dc3545;
}

.revelado-preview-item.disabled {
    opacity: 0.5;
}

.revelado-preview-item .image-wrap {
    height: 200px;
    position: relative;
    background-color: #f0f0f0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.revelado-preview-item img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.revelado-preview-item .image-wrap.cropped img {
    object-fit: cover;
}


.crop-preview-frame {
    position: absolute;
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.5);
    border: 1px dashed #fff;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}
.crop-preview-frame.visible {
    opacity: 1;
}

.revelado-preview-item .controls-wrap {
    padding: 10px;
    background-color: #fff !important;
    border-top: 1px solid #eee;
}

.revelado-preview-item .quantity-controls {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.revelado-crop-btn {
    display: block;
    width: calc(100% - 10px);
    margin: 0 auto 10px;
    padding: 8px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}
.revelado-crop-btn:hover {
    background-color: #5a6268;
}

input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
input[type=number] {
  -moz-appearance: textfield;
}

/* --- INICIO: ESTILOS MODERNOS PARA CONTROLES DE CANTIDAD --- */
#revelado-modal-contenido .revelado-quantity-btn {
    background-color: #278BF5;
    border: none;
    color: #fff;
    cursor: pointer;
    width: 40px; /* Botones más grandes */
    height: 40px; /* Botones más grandes */
    font-size: 24px;
    font-weight: bold;
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#revelado-modal-contenido .revelado-quantity-btn:hover {
    background-color: #1e73cf; /* Un azul un poco más oscuro al pasar el ratón */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

#revelado-modal-contenido .revelado-quantity-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.revelado-quantity-input {
    width: 45px; /* Ancho más ajustado */
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.revelado-quantity-input:focus {
    outline: none;
    border-color: #278BF5;
    box-shadow: 0 0 0 2px rgba(39, 139, 245, 0.25);
}
/* --- FIN: ESTILOS MODERNOS --- */

.revelado-modal-acciones {
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#revelado-cropper-modal-contenido {
    max-width: 90vw;
    width: auto;
}
.revelado-cropper-img-container {
    margin-top: 20px;
    max-height: 70vh;
    max-width: 85vw;
    background-color: #fff;
}
.revelado-cropper-img-container img {
    display: block;
    max-width: 100%;
}

.revelado-cropper-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Estilos para los contadores de fotos */
#revelado-counters {
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
    color: #555;
    margin-top: 15px;
}
#revelado-counters span {
    color: #278BF5;
}