/**
 * Estilos para el Sistema de Modo Admin
 */

/* ===== INDICADOR DE MODO ADMIN ===== */
#admin-mode-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    font-weight: 600;
    animation: slideInRight 0.3s ease-out;
}

.admin-indicator-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-indicator-icon {
    font-size: 18px;
    animation: rotate 2s linear infinite;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes rotate {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* ===== WRAPPER Y OVERLAY DE IMÁGENES ===== */
.admin-img-wrapper {
    position: relative !important;
    display: inline-block !important;
}

.admin-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 10;
}

.admin-img-overlay:hover {
    background: rgba(0, 0, 0, 0.7);
    opacity: 1;
}

.admin-edit-btn {
    background: white;
    color: #667eea;
    padding: 10px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.admin-img-overlay:hover .admin-edit-btn {
    transform: scale(1);
}

/* ===== MODAL ===== */
.admin-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.admin-modal.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.admin-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.admin-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translate(-50%, -40%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

/* ===== MODAL HEADER ===== */
.admin-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-modal-header h3 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.admin-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.admin-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* ===== MODAL BODY ===== */
.admin-modal-body {
    padding: 24px;
}

.admin-current-image {
    margin-bottom: 24px;
    text-align: center;
}

.admin-current-image p {
    margin: 0 0 12px 0;
    color: #666;
    font-weight: 500;
}

.admin-current-image img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-img-path {
    font-size: 12px;
    color: #999;
    word-break: break-all;
    margin-top: 8px !important;
}

/* ===== UPLOAD AREA ===== */
.admin-upload-area {
    margin-bottom: 20px;
}

#admin-file-input {
    display: none;
}

.admin-file-label {
    display: block;
    border: 2px dashed #d0d0d0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.admin-file-label:hover {
    border-color: #667eea;
    background: #f5f7ff;
}

.admin-file-label svg {
    color: #667eea;
    margin-bottom: 12px;
}

.admin-file-label span {
    display: block;
    color: #333;
    font-weight: 600;
}

.admin-file-info {
    font-size: 12px;
    color: #999;
    font-weight: 400 !important;
    margin-top: 8px;
}

/* ===== OPTIONS ===== */
.admin-option-group {
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.admin-danger-zone {
    background: #fff3cd !important;
    border: 2px solid #ff9800;
}

.admin-danger-header {
    font-weight: 700;
    color: #d32f2f;
    margin-bottom: 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.admin-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.admin-checkbox-label span {
    flex: 1;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* ===== PREVIEW ===== */
.admin-preview {
    margin-top: 20px;
    text-align: center;
}

.admin-preview p {
    margin: 0 0 12px 0;
    color: #666;
    font-weight: 500;
}

.admin-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-file-size {
    font-size: 12px;
    color: #999;
    margin-top: 8px !important;
}

/* ===== STATUS MESSAGES ===== */
.admin-upload-status {
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    margin-top: 16px;
}

.admin-upload-status.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.admin-upload-status.error {
    background: #ffebee;
    color: #c62828;
}

/* ===== MODAL FOOTER ===== */
.admin-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.admin-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.admin-btn-secondary:hover {
    background: #e0e0e0;
}

.admin-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.admin-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.admin-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #admin-mode-indicator {
        top: 10px;
        right: 10px;
        padding: 8px 16px;
        font-size: 12px;
    }

    .admin-indicator-icon {
        font-size: 16px;
    }

    .admin-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .admin-modal-header {
        padding: 20px;
    }

    .admin-modal-header h3 {
        font-size: 20px;
    }

    .admin-modal-body {
        padding: 20px;
    }

    .admin-file-label {
        padding: 30px 15px;
    }

    .admin-modal-footer {
        flex-direction: column-reverse;
    }

    .admin-btn {
        width: 100%;
    }
}

/* ===== SCROLLBAR DEL MODAL ===== */
.admin-modal-content::-webkit-scrollbar {
    width: 8px;
}

.admin-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 16px 16px 0;
}

.admin-modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.admin-modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}
