/* Estilos principales de Adivina la Muñeca */

:root {
    --alm-primary: #e91e63;
    --alm-primary-hover: #c2185b;
    --alm-secondary: #9c27b0;
    --alm-success: #2e7d32;
    --alm-success-hover: #1b5e20;
    --alm-warning: #f57c00;
    --alm-bg-card: #ffffff;
    --alm-border: #e0e0e0;
    --alm-text: #2c3e50;
    --alm-text-muted: #7f8c8d;
    --alm-shadow: 0 4px 15px rgba(0,0,0,0.06);
    --alm-radius: 12px;
}

.alm-container {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--alm-text);
}

/* Filtros y cabecera */
.alm-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    background: #fafafa;
    padding: 15px 20px;
    border-radius: var(--alm-radius);
    border: 1px solid var(--alm-border);
}

.alm-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.alm-filter-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    background: #fff;
    color: var(--alm-text);
    border: 1px solid var(--alm-border);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.alm-filter-btn:hover,
.alm-filter-btn.active {
    background: var(--alm-primary);
    color: #fff;
    border-color: var(--alm-primary);
}

/* Botones */
.alm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
}

.alm-btn-primary {
    background: var(--alm-primary);
    color: #fff;
}
.alm-btn-primary:hover {
    background: var(--alm-primary-hover);
    color: #fff;
}

.alm-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}
.alm-btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.alm-btn-success {
    background: var(--alm-success);
    color: #fff;
}
.alm-btn-success:hover {
    background: var(--alm-success-hover);
    color: #fff;
}

.alm-btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.alm-btn-block {
    width: 100%;
}

/* Grilla de tarjetas */
.alm-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.alm-card {
    background: var(--alm-bg-card);
    border-radius: var(--alm-radius);
    border: 1px solid var(--alm-border);
    box-shadow: var(--alm-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.alm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Insignias de la tarjeta */
.alm-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    z-index: 2;
    pointer-events: none;
}

.alm-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    backdrop-filter: blur(4px);
}

.alm-badge-challenge {
    background: rgba(156, 39, 176, 0.9);
}

.alm-badge-identify {
    background: rgba(33, 150, 243, 0.9);
}

.alm-badge-pending {
    background: rgba(245, 124, 0, 0.9);
}

.alm-badge-success {
    background: rgba(46, 125, 50, 0.95);
}

/* Imagen de la tarjeta */
.alm-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    background: #f8fafc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alm-card-image-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.alm-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.alm-card-image-link:hover img {
    transform: scale(1.04);
}

/* Insignia con Lupa en Esquina Inferior Izquierda */
.alm-zoom-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 3;
}

.alm-zoom-badge .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
    line-height: 13px;
}

.alm-card-image-link:hover .alm-zoom-badge {
    background: var(--alm-primary);
    transform: scale(1.05);
}

.alm-points-pill {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: #ffd700;
    color: #2c3e50;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 3;
}

/* Cuerpo de la tarjeta */
.alm-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.alm-card-title {
    font-size: 18px;
    margin: 0 0 12px;
    color: #1a252f;
    line-height: 1.3;
}

.alm-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--alm-text-muted);
    margin-bottom: 15px;
    background: #fdfdfd;
    padding: 10px;
    border-radius: 8px;
    border: 1px dashed var(--alm-border);
}

.alm-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.alm-meta-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--alm-primary);
}

.alm-winner-box {
    background: #e8f5e9;
    color: #1b5e20;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--alm-success);
}

/* Comentarios y Sugerencias */
.alm-suggestions-section {
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
    padding-top: 14px;
}

.alm-suggestions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.alm-suggestions-heading {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--alm-text-muted);
    margin: 0;
}

.alm-btn-link {
    background: none;
    border: none;
    color: var(--alm-primary);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}
.alm-btn-link:hover {
    text-decoration: underline;
}

.alm-comments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 5px;
}

.alm-comments-list-compact {
    max-height: 125px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.alm-simple-modal-content {
    max-width: 520px;
    padding: 22px;
}

.alm-modal-header-simple h3 {
    margin: 0 0 15px;
    font-size: 17px;
}

.modal-comments-list-full {
    max-height: 350px;
    overflow-y: auto;
}

.alm-comment-row {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    position: relative;
    border: 1px solid #eef0f2;
}

.alm-comment-row.alm-winning-comment {
    background: #e8f8f5;
    border-color: #a3e4d7;
}

.alm-comment-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--alm-text-muted);
    margin-bottom: 4px;
}

.alm-comment-author {
    font-weight: 600;
    color: #34495e;
}

.alm-comment-text {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 6px;
}

.alm-btn-attach-file {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid var(--alm-border);
    border-radius: 8px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alm-btn-attach-file:hover {
    background: #e2e8f0;
    color: var(--alm-primary);
}

.alm-comment-image-attached {
    margin-top: 8px;
}

.alm-comment-image-attached img {
    max-width: 140px;
    max-height: 120px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.2s ease;
}

.alm-comment-image-attached img:hover {
    transform: scale(1.04);
}

.alm-winning-badge {
    background: #27ae60;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

/* Formulario de sugerencia rápida */
.alm-input-group {
    display: flex;
    gap: 6px;
}

.alm-input,
.alm-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--alm-border);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
}

.alm-input:focus,
.alm-select:focus {
    border-color: var(--alm-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.15);
}

.alm-suggestion-feedback {
    font-size: 12px;
    margin-top: 6px;
}

/* Formulario de subida */
.alm-upload-container {
    background: #fff;
    padding: 25px;
    border-radius: var(--alm-radius);
    max-width: 550px;
    margin: 0 auto;
}

.alm-form-group {
    margin-bottom: 18px;
}

.alm-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.alm-file-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 25px 15px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease;
}

.alm-file-dropzone:hover {
    border-color: var(--alm-primary);
}

.alm-file-dropzone input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.alm-dropzone-instruction .dashicons {
    font-size: 38px;
    width: 38px;
    height: 38px;
    color: var(--alm-primary);
}

.alm-dropzone-preview img {
    max-height: 160px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Modal */
.alm-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.75) !important;
    z-index: 999999999 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    backdrop-filter: blur(4px);
}

.alm-modal.active {
    display: flex !important;
}

/* Lightbox Modal de Imagen */
.alm-lightbox-content {
    background: transparent !important;
    box-shadow: none !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

.alm-lightbox-img {
    max-width: 90vw !important;
    max-height: 85vh !important;
    object-fit: contain !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}

.alm-lightbox-close {
    position: absolute !important;
    top: -40px !important;
    right: 0 !important;
    color: #ffffff !important;
    font-size: 36px !important;
    cursor: pointer !important;
    line-height: 1 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8) !important;
}

.alm-modal-content {
    background: #ffffff !important;
    width: 100% !important;
    max-width: 540px !important;
    border-radius: 16px !important;
    position: relative !important;
    max-height: 75vh !important;
    overflow-y: auto !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.35) !important;
    box-sizing: border-box !important;
    padding: 20px 18px !important;
    margin: auto !important;
}

.alm-simple-modal-content {
    max-width: 600px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
}

.alm-modal-header-simple {
    padding-right: 40px !important;
    margin-bottom: 20px !important;
    border-bottom: 1px solid #eef0f2 !important;
    padding-bottom: 15px !important;
}

.alm-modal-subtitle {
    font-size: 13px !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    color: var(--alm-primary) !important;
    display: block !important;
    margin-bottom: 6px !important;
    letter-spacing: 0.5px !important;
}

.alm-modal-title {
    margin: 0 !important;
    font-size: 22px !important;
    color: #1e293b !important;
    line-height: 1.3 !important;
    font-weight: 800 !important;
}

.modal-comments-list-full {
    max-height: 50vh !important;
    overflow-y: auto !important;
    padding: 5px 10px 10px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.alm-modal-close {
    position: absolute !important;
    top: 20px !important;
    right: 22px !important;
    font-size: 28px !important;
    cursor: pointer !important;
    color: #94a3b8 !important;
    z-index: 10 !important;
    line-height: 1 !important;
    transition: color 0.2s ease !important;
}

.alm-modal-close:hover {
    color: var(--alm-primary) !important;
}

/* Sección WooCommerce Mi Cuenta */
.alm-account-points-wrapper {
    margin-top: 10px;
}

.alm-points-hero {
    display: flex;
    gap: 30px;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    padding: 30px;
    border-radius: var(--alm-radius);
    border: 1px solid var(--alm-border);
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.alm-points-counter {
    text-align: center;
    background: #fff;
    padding: 25px 35px;
    border-radius: 12px;
    box-shadow: var(--alm-shadow);
}

.alm-points-number {
    display: block;
    font-size: 48px;
    font-weight: 800;
    color: var(--alm-primary);
    line-height: 1;
}

.alm-points-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--alm-text-muted);
}

.alm-redeem-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.alm-coupon-modal-box {
    margin-top: 15px;
    padding: 20px;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 10px;
    font-size: 14px;
}

.alm-coupon-badge-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.alm-coupon-code-badge {
    display: inline-block;
    background: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--alm-success);
    border: 2px dashed var(--alm-success);
}

.alm-btn-copy-coupon {
    transition: all 0.2s ease;
}

.alm-btn-copy-coupon.copied {
    background: #2e7d32 !important;
    color: #fff !important;
    border-color: #2e7d32 !important;
}

.alm-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 15px;
    border-radius: 8px;
}

.alm-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--alm-shadow);
}

.alm-table th,
.alm-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    white-space: normal;
    word-break: break-word;
}

.alm-table th {
    background: #f8fafc;
    font-weight: 600;
}

.alm-tag-credit {
    color: var(--alm-success);
    font-weight: 700;
}

.alm-tag-debit {
    color: #e53935;
    font-weight: 700;
}

/* Separación del botón ¡Esta es! respecto a fotos adjuntas o texto */
.alm-btn-mark-correct {
    margin-top: 12px !important;
}

.alm-comment-image-attached {
    margin-bottom: 8px;
}

/* Modal de confirmación de título */
.alm-confirm-title-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid var(--alm-border);
    border-radius: 8px;
    margin: 15px 0 20px 0;
    box-sizing: border-box;
}

.alm-confirm-title-input:focus {
    border-color: var(--alm-primary);
    outline: none;
}
